Android swipe refresh is very useful to refresh list if your app not auto synchronize data from web service in this post i explain how to implement new SwipeRefresh layout. If you want to read about old SwipeRefresh layout you follow my last post here.

Android new SwipeRefresh Layout

SwipeRefresh is very easy to implement in your project.

Code

Step 1. Create new project in Android Studio / Eclipse.

Step 2. You need to add appcompat support library in your project to make this thing work.

Add appcompat in your build.gradle

Step 3. Now open your activity file and add swiperefresh layout.

Step 4. Now you need to handle swipe when user make over list

Now you load your data and add it into your listview inside onrefresh() method