Stats

130 Contributors: 6 Monday, November 14, 2016
Licensed under: CC-BY-SA
Not affiliated with Stack Overflow
Rip Tutorial: riptutorial@gmail.com
Roadmap: roadmap

Swipe to Refresh

Syntax

  1. setColorSchemeResources sets the colors of the SwipeToRefreshLayout indicator
  2. setOnRefreshListener sets what to do when layout is swiped
  3. 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.

Related Examples