Skip to content Skip to sidebar Skip to footer

I'm Unable To Parse Image From The Json Which I Get From The Service To The Recycler View

This is my Adapter class. I'm unable to parse image from the json which i get from the service. RecyclerViewAdapter.class public class RecyclerViewAdapter extends RecyclerView.Adap

Solution 1:

You have not added any code in your RecyclerViewAdapter.class to load images from url. Try the steps below:

1) First check if you have added internet permission in your AndroidManifest.xml

<uses-permission android:name="android.permission.INTERNET" />

2) I recommend using Picasso Library by Square to load images from url. Check it out here

http://square.github.io/picasso/

3) Add this dependency to your app gradle

compile 'com.squareup.picasso:picasso:2.5.2'

4) Add the below line to your onBindViewHolder method inside your RecyclerViewAdapter.class

Picasso.with(context).load(getDataAdapter1.getImageUrl()).into(holder.imgPost);

Solution 2:

Volley network image view is useful when loading image from URL. its just along with volley library ,we dont need extra library for json parsing etc,

Picasso ,Glide, are also good libs for loading image from URL

Post a Comment for "I'm Unable To Parse Image From The Json Which I Get From The Service To The Recycler View"