com.android.volley.toolbox
クラス NetworkImageView

java.lang.Object
  上位を拡張 ImageView
      上位を拡張 com.android.volley.toolbox.NetworkImageView

public class NetworkImageView
extends ImageView

Handles fetching an image from a URL as well as the life-cycle of the associated request.


コンストラクタの概要
NetworkImageView(Context context)
           
NetworkImageView(Context context, AttributeSet attrs)
           
NetworkImageView(Context context, AttributeSet attrs, int defStyle)
           
 
メソッドの概要
 void setDefaultImageResId(int defaultImage)
          Sets the default image resource ID to be used for this view until the attempt to load it completes.
 void setErrorImageResId(int errorImage)
          Sets the error image resource ID to be used for this view in the event that the image requested fails to load.
 void setImageUrl(java.lang.String url, ImageLoader imageLoader)
          Sets URL of the image that should be loaded into this view.
 
クラス java.lang.Object から継承されたメソッド
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

NetworkImageView

public NetworkImageView(Context context)

NetworkImageView

public NetworkImageView(Context context,
                        AttributeSet attrs)

NetworkImageView

public NetworkImageView(Context context,
                        AttributeSet attrs,
                        int defStyle)
メソッドの詳細

setImageUrl

public void setImageUrl(java.lang.String url,
                        ImageLoader imageLoader)
Sets URL of the image that should be loaded into this view. Note that calling this will immediately either set the cached image (if available) or the default image specified by setDefaultImageResId(int) on the view. NOTE: If applicable, setDefaultImageResId(int) and setErrorImageResId(int) should be called prior to calling this function.

パラメータ:
url - The URL that should be loaded into this ImageView.
imageLoader - ImageLoader that will be used to make the request.

setDefaultImageResId

public void setDefaultImageResId(int defaultImage)
Sets the default image resource ID to be used for this view until the attempt to load it completes.


setErrorImageResId

public void setErrorImageResId(int errorImage)
Sets the error image resource ID to be used for this view in the event that the image requested fails to load.