Code example for ImageView

Methods: getDrawablesetImageBitmapsetImageDrawable

0
 
    private class LoadingListener implements Listener<ImageView> {
        @Override 
        public void onSuccess(ImageView v, Bitmap b) {
            if (!fadeIn) {
                v.setImageBitmap(b);
            } else { 
                Drawable old = v.getDrawable();
                if (old == null) {
                    old = new ColorDrawable(android.R.color.transparent);
                } 
 
                TransitionDrawable d = new TransitionDrawable(new Drawable[] {
                        old,
                        drawableCreator.createDrawable(context, b)
                }); 
 
                v.setImageDrawable(d);
                d.startTransition(fadeDuration);
            } 
        } 
 
        @Override