NotificationTarget

open class NotificationTarget : CustomTarget<T>

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.

Constructors

Link copied to clipboard
open fun NotificationTarget(    context: Context,     viewId: Int,     remoteViews: RemoteViews,     notification: Notification,     notificationId: Int)
Constructor using a Notification object and a notificationId to get a handle on the Notification in order to update it that uses SIZE_ORIGINAL as the target width and height.
Link copied to clipboard
open fun NotificationTarget(    context: Context,     viewId: Int,     remoteViews: RemoteViews,     notification: Notification,     notificationId: Int,     notificationTag: String)
Constructor using a Notification object, a notificationId, and a notificationTag to get a handle on the Notification in order to update it that uses SIZE_ORIGINAL as the target width and height.
Link copied to clipboard
open fun NotificationTarget(    context: Context,     width: Int,     height: Int,     viewId: Int,     remoteViews: RemoteViews,     notification: Notification,     notificationId: Int,     notificationTag: String)
Constructor using a Notification object, a notificationId, and a notificationTag to get a handle on the Notification in order to update it.

Functions

Link copied to clipboard
fun getSize(cb: SizeReadyCallback)
A method to retrieve the size of this target.
Link copied to clipboard
open fun onDestroy()
Callback for when onDestroy} or onDestroy is called.
Link copied to clipboard
open fun onLoadCleared(placeholder: Drawable)
A mandatory lifecycle callback that is called when a load is cancelled and its resources are freed.
Link copied to clipboard
open fun onLoadFailed(errorDrawable: Drawable)
A mandatory lifecycle callback that is called when a load fails.
Link copied to clipboard
open fun onLoadStarted(placeholder: Drawable)
A lifecycle callback that is called when a load is started.
Link copied to clipboard
open fun onResourceReady(resource: Bitmap, transition: Transition<out Any>)
The method that will be called when the resource load has finished.
Link copied to clipboard
open fun onStart()
Callback for when onStart} or onStart is called.
Link copied to clipboard
open fun onStop()
Callback for when onStop} or onStop} is called.
Link copied to clipboard
fun removeCallback(cb: SizeReadyCallback)
Removes the given callback from the pending set if it's still retained.

Properties

Link copied to clipboard
open var request: Request
Link copied to clipboard
val SIZE_ORIGINAL: Int
Indicates that we want the resource in its original unmodified width and/or height.