Code example for View

Methods: getTagsetTag

0
 
        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. 
            Object viewTag = view.getTag();
            if (!imageUrl.equals(viewTag)) {
                return false; 
            } 
            if (bitmap == null) {
                onImageLoadedFailed(); 
            } else { 
                onImageLoadedSuccess(bitmap);
            } 
            if (view != null) {
                // remove the image URL from the view's tag 
                view.setTag(null);
            } 
            return true; 
        } 
 
        protected abstract void onImageLoadedFailed(); 
Experience pair programming with AI  Get Codota for Java