Swipe to Refresh
suggest changeVersions
This topic was documented against Android 3.0.x through 7.1. SwipeRefreshLayout itself comes from the support library.
Syntax
- setColorSchemeResources sets the colors of the
SwipeRefreshLayoutindicator - setOnRefreshListener sets what to do when layout is swiped
app:layout_behavior="@string/appbar_scrolling_view_behavior"if you have a Toolbar with your layout, add this with the scrollFlags in Toolbar and the Toolbar will slide up while scrolling down and slide in again while scrolling up.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents