Advertisement
Guest User

Untitled

a guest
Jul 24th, 2014
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.92 KB | None | 0 0
  1. ImageView iv = (ImageView) findViewById(R.id.img);
  2.         pb = (ProgressBar) findViewById(R.id.progressBar1);
  3.         iv.setAnimation(null);
  4.         iv.setVisibility(View.GONE); // set image invisible to show the loader
  5.         pb.setVisibility(View.VISIBLE);
  6.  
  7.         UrlImageViewHelper.setUrlDrawable(iv, pictureUrl, R.drawable.loading,
  8.                 new UrlImageViewCallback() {
  9.                     @Override
  10.                     public void onLoaded(ImageView _imageView,
  11.                             Bitmap _loadedBitmap, String _url,
  12.                             boolean _loadedFromCache) {
  13.                         _imageView.setVisibility(View.VISIBLE); // set the image
  14.                                                                 // visible
  15.                         pb.setVisibility(View.GONE);
  16.                         // ScaleAnimation scale = new ScaleAnimation(0, 1, 0, 1,
  17.                         // ScaleAnimation.RELATIVE_TO_SELF, .5f,
  18.                         // ScaleAnimation.RELATIVE_TO_SELF, .5f);
  19.                         // scale.setDuration(300);
  20.                         // scale.setInterpolator(new OvershootInterpolator());
  21.                         // _imageView.startAnimation(scale);
  22.                     }
  23.                 });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement