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,
RemoteViews remoteViews,
int viewId,
ComponentName componentName)
Constructor using a ComponentName, when override has been set 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,
RemoteViews remoteViews,
int viewId,
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. |
AppWidgetTarget(Context context,
RemoteViews remoteViews,
int viewId,
int width,
int height,
ComponentName componentName)
Constructor using a ComponentName to get a handle on the Widget in order to update it.
|
AppWidgetTarget(Context context,
RemoteViews remoteViews,
int viewId,
int width,
int height,
int... widgetIds)
Constructor using an int array of widgetIds to get a handle on the Widget in order to update it.
|
Modifier and Type | Method and Description |
---|---|
void |
onResourceReady(Bitmap resource,
GlideAnimation<? super Bitmap> glideAnimation)
The method that will be called when the resource load has finished.
|
getSize
getRequest, onDestroy, onLoadCleared, onLoadFailed, onLoadStarted, onStart, onStop, setRequest
public AppWidgetTarget(Context context, RemoteViews remoteViews, int viewId, int width, int height, int... widgetIds)
context
- Context to use in the AppWidgetManager initialization.remoteViews
- RemoteViews object which contains the ImageView that will load the bitmap.viewId
- The id of the ImageView view that will load the image.width
- Desired width in pixels of the bitmap that will be loaded. (Needs to be manually set
because of RemoteViews limitations.)height
- Desired height in pixels of the bitmap that will be loaded. (Needs to be manually set
because of RemoteViews limitations.)widgetIds
- The int[] that contains the widget ids of an application.public AppWidgetTarget(Context context, RemoteViews remoteViews, int viewId, int... widgetIds)
Target.SIZE_ORIGINAL
as the target width and height.context
- Context to use in the AppWidgetManager initialization.remoteViews
- RemoteViews object which contains the ImageView that will load the bitmap.viewId
- The id of the ImageView view that will load the image.widgetIds
- The int[] that contains the widget ids of an application.public AppWidgetTarget(Context context, RemoteViews remoteViews, int viewId, int width, int height, ComponentName componentName)
context
- Context to use in the AppWidgetManager initialization.remoteViews
- RemoteViews object which contains the ImageView that will load the bitmap.viewId
- The id of the ImageView view that will load the image.width
- Desired width in pixels of the bitmap that will be loaded. (Needs to be manually set
because of RemoteViews limitations.)height
- Desired height in pixels of the bitmap that will be loaded. (Needs to be manually set
because of RemoteViews limitations.)componentName
- The ComponentName that refers to our AppWidget.public AppWidgetTarget(Context context, RemoteViews remoteViews, int viewId, ComponentName componentName)
Target.SIZE_ORIGINAL
as the target width and height.context
- Context to use in the AppWidgetManager initialization.remoteViews
- RemoteViews object which contains the ImageView that will load the bitmap.viewId
- The id of the ImageView view that will load the image.componentName
- The ComponentName that refers to our AppWidget.public void onResourceReady(Bitmap resource, GlideAnimation<? super Bitmap> glideAnimation)
Target
resource
- the loaded resource.