com.bumptech.glide.request.target
Class NotificationTarget
java.lang.Object
com.bumptech.glide.request.target.BaseTarget<Z>
com.bumptech.glide.request.target.SimpleTarget<android.graphics.Bitmap>
com.bumptech.glide.request.target.NotificationTarget
- All Implemented Interfaces:
- LifecycleListener, Target<android.graphics.Bitmap>
public class NotificationTarget
- extends SimpleTarget<android.graphics.Bitmap>
This class is used to display downloaded Bitmap inside an ImageView of a Notification through RemoteViews.
Note - For cancellation to work correctly, you must pass in the same instance of this class for every subsequent
load.
|
Constructor Summary |
NotificationTarget(android.content.Context context,
android.widget.RemoteViews remoteViews,
int viewId,
int width,
int height,
android.app.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(android.content.Context context,
android.widget.RemoteViews remoteViews,
int viewId,
android.app.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. |
|
Method Summary |
void |
onResourceReady(android.graphics.Bitmap resource,
GlideAnimation<? super android.graphics.Bitmap> glideAnimation)
The method that will be called when the resource load has finished. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NotificationTarget
public NotificationTarget(android.content.Context context,
android.widget.RemoteViews remoteViews,
int viewId,
android.app.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.
- Parameters:
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.
NotificationTarget
public NotificationTarget(android.content.Context context,
android.widget.RemoteViews remoteViews,
int viewId,
int width,
int height,
android.app.Notification notification,
int notificationId)
- Constructor using a Notification object and a notificationId to get a handle on the Notification in order to
update it.
- Parameters:
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.
onResourceReady
public void onResourceReady(android.graphics.Bitmap resource,
GlideAnimation<? super android.graphics.Bitmap> glideAnimation)
- Description copied from interface:
Target
- The method that will be called when the resource load has finished.
- Parameters:
resource - the loaded resource.