com.github.droidfu.imageloader
Class ImageLoaderHandler

java.lang.Object
  extended by android.os.Handler
      extended by com.github.droidfu.imageloader.ImageLoaderHandler

public class ImageLoaderHandler
extends android.os.Handler


Nested Class Summary
 
Nested classes/interfaces inherited from class android.os.Handler
android.os.Handler.Callback
 
Constructor Summary
ImageLoaderHandler(android.widget.ImageView imageView, String imageUrl)
           
ImageLoaderHandler(android.widget.ImageView imageView, String imageUrl, android.graphics.drawable.Drawable errorDrawable)
           
 
Method Summary
 String getImageUrl()
           
 android.widget.ImageView getImageView()
           
protected  boolean handleImageLoaded(android.graphics.Bitmap bitmap, android.os.Message msg)
          Override this method if you need custom handler logic.
protected  void handleImageLoadedMessage(android.os.Message msg)
           
 void handleMessage(android.os.Message msg)
           
 void setImageUrl(String imageUrl)
           
 void setImageView(android.widget.ImageView imageView)
           
 
Methods inherited from class android.os.Handler
dispatchMessage, dump, getLooper, hasMessages, hasMessages, obtainMessage, obtainMessage, obtainMessage, obtainMessage, obtainMessage, post, postAtFrontOfQueue, postAtTime, postAtTime, postDelayed, removeCallbacks, removeCallbacks, removeCallbacksAndMessages, removeMessages, removeMessages, sendEmptyMessage, sendEmptyMessageAtTime, sendEmptyMessageDelayed, sendMessage, sendMessageAtFrontOfQueue, sendMessageAtTime, sendMessageDelayed, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ImageLoaderHandler

public ImageLoaderHandler(android.widget.ImageView imageView,
                          String imageUrl)

ImageLoaderHandler

public ImageLoaderHandler(android.widget.ImageView imageView,
                          String imageUrl,
                          android.graphics.drawable.Drawable errorDrawable)
Method Detail

handleMessage

public final void handleMessage(android.os.Message msg)
Overrides:
handleMessage in class android.os.Handler

handleImageLoadedMessage

protected final void handleImageLoadedMessage(android.os.Message msg)

handleImageLoaded

protected boolean handleImageLoaded(android.graphics.Bitmap bitmap,
                                    android.os.Message msg)
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

Parameters:
bitmap - the bitmap returned from the image loader
msg - the handler message; can be null
Returns:
true if the view was updated with the new image, false if it was discarded

getImageUrl

public String getImageUrl()

setImageUrl

public void setImageUrl(String imageUrl)

getImageView

public android.widget.ImageView getImageView()

setImageView

public void setImageView(android.widget.ImageView imageView)


Copyright © 2011. All Rights Reserved.