public class NotificationTarget 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 |
|---|
NotificationTarget(Context context,
RemoteViews remoteViews,
int viewId,
int width,
int height,
Notification notification,
int notificationId)
Constructor using a Notification object and a notificationId to get a handle on the Notification in order to
update it.
|
NotificationTarget(Context context,
RemoteViews remoteViews,
int viewId,
Notification notification,
int notificationId)
Constructor using a Notification object and a notificationId to get a handle on the Notification 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,
GlideAnimation<? super Bitmap> glideAnimation)
The method that will be called when the resource load has finished.
|
getSizegetRequest, onDestroy, onLoadCleared, onLoadFailed, onLoadStarted, onStart, onStop, setRequestpublic NotificationTarget(Context context, RemoteViews remoteViews, int viewId, Notification notification, int notificationId)
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.notification - The Notification object that we want to update.notificationId - The notificationId of the Notification that we want to load the Bitmap.public NotificationTarget(Context context, RemoteViews remoteViews, int viewId, int width, int height, Notification notification, int notificationId)
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 of the bitmap that will be loaded.(Need to be manually set
because of RemoteViews limitations.)height - Desired height of the bitmap that will be loaded. (Need to be manually set
because of RemoteViews limitations.)notification - The Notification object that we want to update.notificationId - The notificationId of the Notification that we want to load the Bitmap.public void onResourceReady(Bitmap resource, GlideAnimation<? super Bitmap> glideAnimation)
Targetresource - the loaded resource.