How to used Recycler View with Swipe Refresh in AndroidX

Codeplayon
1 min readMay 1, 2020

Hiii developer in this AndroidX Example, I am Share how to use How to used Recycler View with Swipe Refresh in AndroidX. In this Android Example, I am using all google design material library with API Level 29.

Also, you can read in this article show Rest API data in recycler view and using swipe refresh. first, off we can use a network library to forget the response from the server with a JSONArray. TO parses JSON data to a list with Recycler View in AndroidX.

The topic of this Article:-

  1. JSON Parsing with Rest API for Server.
  2. How TO Parsing JSONArrary list Response for Server API.
  3. Recycler View List in AndroidX.
  4. How to used Swipe refresh list Data in AndroidX.
  5. JSON Volley with Array List.
  6. How to used Recycler View with Swipe Refresh in AndroidX.

Let’s Start on the Solution:- create a new AndroidX project and add these dependencies in your App base build.gradle.

Add Android Dependency :

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation "androidx.drawerlayout:drawerlayout:1.0.0"
implementation 'com.google.android.material:material:1.1.0'
implementation "androidx.coordinatorlayout:coordinatorlayout:1.1.0"
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.android.volley:volley:1.1.0'
implementation 'de.hdodenhof:circleimageview:2.1.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'

Step 2: Add Recycler view list and swipe refresh in XML Layout

--

--

Codeplayon

Codeplayon - Mobile App Development & SEO Digital Marketing Company , Gurugram & Delhi, visit our website :-https://www.codeplayon.com/ Mobile No:- 9671718285