Notification.Builder.SetColorized(Boolean) Method

Definition

Set whether this notification should be colorized.

[Android.Runtime.Register("setColorized", "(Z)Landroid/app/Notification$Builder;", "GetSetColorized_ZHandler", ApiSince=26)]
public virtual Android.App.Notification.Builder SetColorized(bool colorize);
[<Android.Runtime.Register("setColorized", "(Z)Landroid/app/Notification$Builder;", "GetSetColorized_ZHandler", ApiSince=26)>]
abstract member SetColorized : bool -> Android.App.Notification.Builder
override this.SetColorized : bool -> Android.App.Notification.Builder

Parameters

colorize
Boolean

boolean

Returns

This Android.App.Notification.Builder instance, allowing calls to be chained.

Attributes

Remarks

Set whether this notification should be colorized. When set, the color set with setColor(int) will be used as the background color of this notification. This should only be used for high priority ongoing tasks like navigation, an ongoing call, or other similarly high-priority events for the user. For most styles, the coloring will only be applied if the notification is for a foreground service notification. However, for MediaStyle and DecoratedMediaCustomViewStyle notifications that have a media session attached there is no such requirement.

See also:

Android reference for android.app.Notification.Builder.setColorized.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to