Advertisement
joris

Class PicasoLoadImage

Aug 4th, 2017
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.66 KB | None | 0 0
  1. public class PicasoLoadImage extends Application {
  2.  
  3.     public static String loadImagePicaso(String id, Context ctx, ImageView template) {
  4.  
  5.         String URL_PROFILE = null;
  6.  
  7.         Picasso.with( ctx )
  8.                 .load( URL_PROFILE )
  9.                 .networkPolicy( NetworkPolicy.OFFLINE )
  10.                 .placeholder( R.drawable.no_profile )
  11.                 .into( template, new Callback() {
  12.                     @Override
  13.                     public void onSuccess() {
  14.  
  15.                     }
  16.  
  17.                     @Override
  18.                     public void onError() {
  19.  
  20.                     }
  21.                 } );
  22.  
  23.         return null;
  24.     }
  25.  
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement