Skip to content

Instantly share code, notes, and snippets.

@chetdeva
Created April 12, 2018 09:58
Show Gist options
  • Save chetdeva/5474a1fef8f20dc1269b61bfcaea451c to your computer and use it in GitHub Desktop.
Save chetdeva/5474a1fef8f20dc1269b61bfcaea451c to your computer and use it in GitHub Desktop.
<Spinner
android:id="@+id/item_quantity_spinner"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:background="@drawable/ic_spinner_bg"
android:gravity="center_vertical"
android:paddingStart="4dp"
android:textSize="16sp"
app:entries="@{model.quantityEntries}"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@id/item_image"
app:newValue="@{model.quantity}"
app:onItemSelected="@{(newValue) -> presenter.onItemQuantityChange(model.cartItem, Converter.toInt(newValue))}" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment