Skip to content

Instantly share code, notes, and snippets.

@chetdeva
Last active September 29, 2017 06:03
Show Gist options
  • Select an option

  • Save chetdeva/3efc9548f9c344f95ef12ca057c8bee4 to your computer and use it in GitHub Desktop.

Select an option

Save chetdeva/3efc9548f9c344f95ef12ca057c8bee4 to your computer and use it in GitHub Desktop.
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/srl"
android:layout_width="match_parent"
android:layout_height="match_parent"
bind:onPulledToRefresh="@{() -> presenter.initialize()}">
<android.support.v7.widget.RecyclerView
android:id="@+id/rv"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/grey"
app:layoutManager="android.support.v7.widget.LinearLayoutManager"
bind:onScrolledToBottom="@{(page) -> presenter.onLoadMore(page)}"
bind:resetLoadingState="@{model.resetLoadingState}"
bind:spaceItemDecoration="@{@dimen/space_very_low}"
bind:visibleThreshold="@{model.visibleThreshold}"
tools:listitem="@layout/item_main" />
</android.support.v4.widget.SwipeRefreshLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment