com.droidux.pack.gallery.adapters.GalleryUrlImageAdapter |
Known Indirect Subclasses |
Extended Adapter to be implemented when the underlying data need to download images from URLs.
When used with widgets that supports it, such as the GalleryFlows
,
this adapter allows efficient tasks/threads management for downloading images from the internet.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
GalleryUrlImageAdapter.Request | A Request object is used to add image url to the queue for download from the web. |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From interface
android.widget.Adapter
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Download images from URLs.
| |||||||||||
When there's an error when downloading the image or transforming the remote image to a Bitmap, this callback will be called.
| |||||||||||
Callback when the image is successfully downloaded and transformed to a Bitmap.
| |||||||||||
Callback when the image has to be downloaded from the web, or from the cache that will take relatively long time to fetch (e.g.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From interface
android.widget.Adapter
|
Download images from URLs.
Use the given GalleryUrlImageAdapter.Request
object to add the image url(s) to the download queue.
The actual download will be done and managed internally by the widgets that support this adapter.
position | The position of the data in the adapter |
---|---|
itemView | The item view for the position. This is the same as returned by the getView(int, android.view.View, android.view.ViewGroup). |
request | Use it to add the image url to the download queue. |
When there's an error when downloading the image or transforming the remote image to a Bitmap, this callback will be called.
position | The position of the data in the adapter. |
---|---|
itemView | The item view representing the data in the adapter for the specified position. This is the same view returned by getView(int, android.view.View, android.view.ViewGroup) |
url | The url of the image |
refId | The reference id of the image, as specified when using download(String, int) . Default is 0. |
exception | The exception that occurred when downloading the requested image. |
Callback when the image is successfully downloaded and transformed to a Bitmap.
position | The position of the data in the adapter. |
---|---|
itemView | The item view representing the data in the adapter for the specified position. This is the same view returned by getView(int, android.view.View, android.view.ViewGroup) |
url | The url of the image |
refId | The reference id of the image, as specified when using download(String, int) . Default is 0. |
bitmap | The downloaded image. |
Callback when the image has to be downloaded from the web, or from the cache that will take relatively long time to fetch (e.g. disk cache).
position | The position of the data in the adapter. |
---|---|
itemView | The item view representing the data in the adapter for the specified position. This is the same view returned by getView(int, android.view.View, android.view.ViewGroup) |
url | The url of the image |
refId | The reference id of the image, as specified when using download(String, int) . Default is 0.
|