Every app needs to fetch data on user interaction that may be using a refresh button or may be a swipe or pull down to refresh view.In this tutorial we can see through Android swipe to refresh view tutorial.


In this tutorial i will be using api which will be parsing dynamic results.

All the data, information, images got from

API : https://randomuser.me


Add required dependencies before getting started




Add a SwipeRefreshLayout to the layout


Design a view to show details






Initialize all the views in oncreate using init() method.


Fetch data using retrofit



Set the data to the views using glide for image view






Add Internet permission to manifest file



Output :


Show Buttons
Hide Buttons
Read previous post:
Android Staggered GridView Tutorial || Staggered Grid Example