Picasso Library just Saves The First Image of mu ListView? -


i'm using picasso library image url on internet , save them in sdcard , doesn't save images in listview , saves first 1 ( or after restarting app second 1 ) , how can fix ? here code inside adapter :

picasso.with(g.context)   // first loading image imageview .load(info.getimage()) .into(holder.image);  picasso.with(g.context)  //simultanously save on sdcard .load(info.getimage()) .into(target);    private target target = new target() {      @override     public void onbitmaploaded(final bitmap bitmap, picasso.loadedfrom from) {         new thread(new runnable() {              @override             public void run() {                  file file = new file(savesd + minfo.gettitle() + ".jpg");                  try {                     file.createnewfile();                     fileoutputstream ostream = new fileoutputstream(file);                     bitmap.compress(bitmap.compressformat.jpeg, 80, ostream);                     ostream.flush();                     ostream.close();                 } catch (exception e) {                     e.printstacktrace();                 }              }         }).start();     }      @override     public void onbitmapfailed(drawable errordrawable) {     }      @override     public void onprepareload(drawable placeholderdrawable) {         if (placeholderdrawable != null) {         }     } }; 


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -