| java.lang.Object | ||
| ↳ | com.neomades.ui.View | |
| ↳ | com.neomades.content.image.ImageUrlLabel | |
Handles fetching an image from a URL as well as the life-cycle of the associated request.
The URL will be loaded when the View become visible, and image request will be cancelled if the View become hidden or the URL has been replaced.
| [Expand] Inherited XML Attributes | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|  From class
com.neomades.ui.View | |||||||||||
| [Expand] Inherited Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|  From interface
com.neomades.ui.Alignment | |||||||||||
|  From interface
com.neomades.ui.StretchMode | |||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| ImageUrlLabel() Creates an ImageLabel with URL and  ImageLoader | |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| void | setDefaultImage(int defaultImage) Sets the default image resource ID to be used for this view until the attempt
 to load it completes. | ||||||||||
| void | setErrorImage(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 | setImageScaleType(int scaleType) Set the scale type for the image contained into this button. | ||||||||||
| void | setImageUrl(String url, ImageLoader imageLoader) Sets URL of the image that should be loaded into this view. | ||||||||||
| [Expand] Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|  From class
  com.neomades.ui.View | |||||||||||
|  From class
  java.lang.Object | |||||||||||
Sets the default image resource ID to be used for this view until the attempt to load it completes.
 >NOTE: If applicable, setDefaultImage(int)
 should be called prior to calling setImageUrl(String, ImageLoader).
 
| defaultImage | resource identifier used by setImageUrl(String, ImageLoader)when the loader loads
            the URL. | 
|---|
Sets the error image resource ID to be used for this view in the event that the image requested fails to load.
 >NOTE: If applicable, setErrorImage(int) should
 be called prior to calling setImageUrl(String, ImageLoader).
 
| errorImage | resource identifier used by setImageUrl(String, ImageLoader)when the loader has
            failed loading the URL. | 
|---|
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 setDefaultImage(int) on the
 view.
 
 
 If this function is called many times with different URLs, older url loads
 are cancelled. Setting URL to null will cancel the previous url
 loading.
 
 NOTE: If applicable, setDefaultImage(int) and
 setErrorImage(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. |