Code example for ImageView

Methods: getContext

0
            this.defaultImageId = defaultImageId;
        } 
 
        @Override 
        public void onImageLoaded(@Nullable final Bitmap image) {
            final Activity activity = (Activity) imageView.getContext();
            AThreads.tryRunOnUiThread(activity, new Runnable() {
                @Override 
                public void run() { 
                    if (image != null) {
                        imageView.setImageBitmap(image);
                    } else { 
                        if (defaultImageId != null) {
                            imageView.setImageResource(defaultImageId);
                        } 
                    } 
                } 
            }); 
        } 
 
        @Override