Implementing Pull to Refresh Guide
Overview In Android, the common "pull to refresh" UX concept is not built in to a ListView/RecyclerView. However, many Android applications would like to make use of this concept for their feeds. This is useful for all sorts of feeds such as a Twitter timeline. This effect can be achieved using the SwipeRefreshLayout from the support library , which was recently introduced and back-ported to all versions down to Android API level 4. Using SwipeRefreshLayout SwipeRefreshLayout is a ViewGroup that can hold only one scrollable view as a child. This can be either a ScrollView or an AdapterView such as a ListView or a RecyclerView . Note: This layout only exists within more recent versions of support-v4 as explained in this post . Edit your app/build.gradle file to include a support library later than version 19: apply plugin : ' com.android.application ' // ... dependencies { // ... implementation ' com.android.support:support-v...