protected boolean handleImageLoaded ( Bitmap bitmap , Message msg ) { // If this handler is used for loading images in a ListAdapter, // the thread will set the image only if it's the right position, // otherwise it won't do anything. String forUrl = ( String ) imageView . getTag ( ) ; if ( imageUrl . equals ( forUrl ) ) { Bitmap image = bitmap != null || errorDrawable == null ? bitmap : ( ( BitmapDrawable ) errorDrawable ) . getBitmap ( ) ; if ( image != null ) { imageView . setImageBitmap ( image ) ; } return true ; } return false ; }
Override this method if you need custom handler logic . Note that this method can actually be called directly for performance reasons in which case the message will be null