AppWidgetTarget
This class is used in order to display downloaded Bitmap inside an ImageView of an AppWidget through RemoteViews.
Note - For cancellation to work correctly, you must pass in the same instance of this class for every subsequent load.
Constructors
Link copied to clipboard
Link copied to clipboard
open fun AppWidgetTarget( context: Context, viewId: Int, remoteViews: RemoteViews, widgetIds: Array<Int>)
Content copied to clipboard
Constructor using an int array of widgetIds to get a handle on the Widget in order to update it that uses SIZE_ORIGINAL as the target width and height.
Link copied to clipboard
open fun AppWidgetTarget( context: Context, width: Int, height: Int, viewId: Int, remoteViews: RemoteViews, componentName: ComponentName)
Content copied to clipboard
Constructor using a ComponentName to get a handle on the Widget in order to update it.
Link copied to clipboard
open fun AppWidgetTarget( context: Context, viewId: Int, remoteViews: RemoteViews, componentName: ComponentName)
Content copied to clipboard
Constructor using a ComponentName, when override has been put to get a handle on the Widget in order to update it that uses SIZE_ORIGINAL as the target width and height.
Functions
Link copied to clipboard
A method to retrieve the size of this target.
Link copied to clipboard
A mandatory lifecycle callback that is called when a load is cancelled and its resources are freed.
Link copied to clipboard
A mandatory lifecycle callback that is called when a load fails.
Link copied to clipboard
A lifecycle callback that is called when a load is started.
Link copied to clipboard
open fun onResourceReady(resource: Bitmap, transition: Transition<out Any>)
Content copied to clipboard
The method that will be called when the resource load has finished.
Link copied to clipboard
Removes the given callback from the pending set if it's still retained.