Skip to content

Instantly share code, notes, and snippets.

@chetdeva
Last active August 2, 2017 06:20
Show Gist options
  • Save chetdeva/2ed2d73e61e428eb4c0c6a19e96ecf9b to your computer and use it in GitHub Desktop.
Save chetdeva/2ed2d73e61e428eb4c0c6a19e96ecf9b to your computer and use it in GitHub Desktop.
<android.support.v7.widget.RecyclerView
android:id="@+id/rv"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white"
bind:bgColorSwipeLeft="@{@color/app_green}"
bind:bgColorSwipeRight="@{@color/app_red}"
bind:drawableSwipeLeft="@{@drawable/ic_check_white_24dp}"
bind:drawableSwipeRight="@{@drawable/ic_close_white_24dp}"
bind:onItemSwipeLeft="@{(position) -> handler.onItemSwipedLeft(position)}"
bind:onItemSwipeRight="@{(position) -> handler.onItemSwipedRight(position)}"
bind:swipeEnabled="@{true}"/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment