com.github.ignition.support.images.remote
Class RemoteImageLoaderHandler

java.lang.Object
  extended by android.os.Handler
      extended by com.github.ignition.support.images.remote.RemoteImageLoaderHandler

public class RemoteImageLoaderHandler
extends android.os.Handler


Nested Class Summary
 
Nested classes/interfaces inherited from class android.os.Handler
android.os.Handler.Callback
 
Field Summary
static String BITMAP_EXTRA
           
static int HANDLER_MESSAGE_ID
           
static String IMAGE_URL_EXTRA
           
 
Constructor Summary
RemoteImageLoaderHandler(android.widget.ImageView imageView, String imageUrl, android.graphics.drawable.Drawable errorDrawable)
           
RemoteImageLoaderHandler(android.os.Looper looper, 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
 

Field Detail

HANDLER_MESSAGE_ID

public static final int HANDLER_MESSAGE_ID
See Also:
Constant Field Values

BITMAP_EXTRA

public static final String BITMAP_EXTRA
See Also:
Constant Field Values

IMAGE_URL_EXTRA

public static final String IMAGE_URL_EXTRA
See Also:
Constant Field Values
Constructor Detail

RemoteImageLoaderHandler

public RemoteImageLoaderHandler(android.widget.ImageView imageView,
                                String imageUrl,
                                android.graphics.drawable.Drawable errorDrawable)

RemoteImageLoaderHandler

public RemoteImageLoaderHandler(android.os.Looper looper,
                                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 © 2012. All Rights Reserved.