Class LoadImageTask
- All Implemented Interfaces:
Component
@Emits(events={"didSetVideoStill","didSetVideoStillError"})
@ListensFor(events={})
public class LoadImageTask
extends android.os.AsyncTask<URI,Void,android.graphics.Bitmap>
implements Component
General purpose AsyncTask to load an image over the network into an ImageView. The Event type
specified in the constructor will be emitted on successful load of an image.
-
Nested Class Summary
Nested classes/interfaces inherited from class android.os.AsyncTask
android.os.AsyncTask.Status
-
Field Summary
Fields inherited from class android.os.AsyncTask
SERIAL_EXECUTOR, THREAD_POOL_EXECUTOR
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected android.graphics.Bitmap
doInBackground
(URI... params) Loads a Bitmap over the network using the given URL.Get the currently configured EventType string that is to be emitted on successful load of a Bitmap.protected void
onPostExecute
(android.graphics.Bitmap image) On successful load of a Bitmap from the background thread, put that Bitmap in the ImageView provided to this task.void
setSuccessEventType
(String type) Set the EventType string to be emitted on successful load of a Bitmap.Methods inherited from class android.os.AsyncTask
cancel, execute, execute, executeOnExecutor, get, get, getStatus, isCancelled, onCancelled, onCancelled, onPreExecute, onProgressUpdate, publishProgress
-
Field Details
-
TAG
-
-
Constructor Details
-
LoadImageTask
-
-
Method Details
-
getSuccessEventType
Get the currently configured EventType string that is to be emitted on successful load of a Bitmap.- Returns:
- the EventType string to be used on success, or null if none is set
-
setSuccessEventType
Set the EventType string to be emitted on successful load of a Bitmap.- Parameters:
type
- the EventType string
-
doInBackground
Loads a Bitmap over the network using the given URL. -
onPostExecute
protected void onPostExecute(android.graphics.Bitmap image) On successful load of a Bitmap from the background thread, put that Bitmap in the ImageView provided to this task.
-