I am using Picasso whose dependency is added in the gradle file
compile 'com.squareup.picasso:picasso:2.5.2'
This is My class
public class ImageLoader {
private Picasso mPicasso;
private static ImageLoader mInstance;
public static ImageLoader getInstance(Context context) {
if(mInstance==null)
mInstance = new ImageLoader(context);
return mInstance;
}
private ImageLoader(Context context) {
mPicasso = new Picasso.Builder(context).build();
}
private Picasso getImageLoader(Context context) {
return mPicasso;
}
public void loadImage(ImageView imageView,String url) {
mPicasso.load(url).into(imageView);
}
}
And I am invoking the method like this
ImageLoader.getInstance(context).loadImage(holder.imgeView, url);
The issue is that it is loading the image on emulator but not on the mobile device. What is problem ?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…