public class AppWidgetTarget extends SimpleTarget<Bitmap>
Note - For cancellation to work correctly, you must pass in the same instance of this class for every subsequent load.
SIZE_ORIGINAL
Constructor and Description |
---|
AppWidgetTarget(Context context,
int width,
int height,
int viewId,
RemoteViews remoteViews,
ComponentName componentName)
Constructor using a ComponentName to get a handle on the Widget in order to update it.
|
AppWidgetTarget(Context context,
int width,
int height,
int viewId,
RemoteViews remoteViews,
int... widgetIds)
Constructor using an int array of widgetIds to get a handle on the Widget in order to update
it.
|
AppWidgetTarget(Context context,
int viewId,
RemoteViews remoteViews,
ComponentName componentName)
Constructor using a ComponentName, when override has been put to get a handle on the Widget in
order to update it that uses
Target.SIZE_ORIGINAL as the target width and height. |
AppWidgetTarget(Context context,
int viewId,
RemoteViews remoteViews,
int... widgetIds)
Constructor using an int array of widgetIds to get a handle on the Widget in order to update it
that uses
Target.SIZE_ORIGINAL as the target width and height. |
Modifier and Type | Method and Description |
---|---|
void |
onResourceReady(Bitmap resource,
Transition<? super Bitmap> transition)
The method that will be called when the resource load has finished.
|
getSize, removeCallback
getRequest, onDestroy, onLoadCleared, onLoadFailed, onLoadStarted, onStart, onStop, setRequest
public AppWidgetTarget(Context context, int width, int height, int viewId, RemoteViews remoteViews, int... widgetIds)
context
- Context to use in the AppWidgetManager initialization.width
- Desired width in pixels of the bitmap that will be loaded. (Needs to be
manually put because of RemoteViews limitations.)height
- Desired height in pixels of the bitmap that will be loaded. (Needs to be
manually put because of RemoteViews limitations.)viewId
- The id of the ImageView view that will load the image.remoteViews
- RemoteViews object which contains the ImageView that will load the bitmap.widgetIds
- The int[] that contains the widget ids of an application.public AppWidgetTarget(Context context, int viewId, RemoteViews remoteViews, int... widgetIds)
Target.SIZE_ORIGINAL
as the target width and height.context
- Context to use in the AppWidgetManager initialization.viewId
- The id of the ImageView view that will load the image.remoteViews
- RemoteViews object which contains the ImageView that will load the bitmap.widgetIds
- The int[] that contains the widget ids of an application.public AppWidgetTarget(Context context, int width, int height, int viewId, RemoteViews remoteViews, ComponentName componentName)
context
- Context to use in the AppWidgetManager initialization.width
- Desired width in pixels of the bitmap that will be loaded. (Needs to be
manually put because of RemoteViews limitations.)height
- Desired height in pixels of the bitmap that will be loaded. (Needs to be
manually put because of RemoteViews limitations.)viewId
- The id of the ImageView view that will load the image.remoteViews
- RemoteViews object which contains the ImageView that will load the
bitmap.componentName
- The ComponentName that refers to our AppWidget.public AppWidgetTarget(Context context, int viewId, RemoteViews remoteViews, ComponentName componentName)
Target.SIZE_ORIGINAL
as the target width and height.context
- Context to use in the AppWidgetManager initialization.viewId
- The id of the ImageView view that will load the image.remoteViews
- RemoteViews object which contains the ImageView that will load the
bitmap.componentName
- The ComponentName that refers to our AppWidget.