Added in API level 33

Builder

class Builder
kotlin.Any
   ↳ android.app.ActivityManager.TaskDescription.Builder

Provides a convenient way to set the fields of a TaskDescription when creating a new instance.

Summary

Public constructors

Public methods
ActivityManager.TaskDescription

Build the TaskDescription.

ActivityManager.TaskDescription.Builder

Set the background color to use in the TaskDescription.

ActivityManager.TaskDescription.Builder
setIcon(iconRes: Int)

Set the drawable resource of the icon to use in the TaskDescription.

ActivityManager.TaskDescription.Builder
setLabel(label: String?)

Set the label to use in the TaskDescription.

ActivityManager.TaskDescription.Builder

Set the navigation bar color to use in the TaskDescription.

ActivityManager.TaskDescription.Builder

Set the primary color to use in the TaskDescription.

ActivityManager.TaskDescription.Builder

Set the status bar color to use in the TaskDescription.

Public constructors

Builder

Builder()

Public methods

build

Added in API level 33
fun build(): ActivityManager.TaskDescription

Build the TaskDescription.

Return
ActivityManager.TaskDescription the TaskDescription object. This value cannot be null.

setBackgroundColor

Added in API level 33
fun setBackgroundColor(color: Int): ActivityManager.TaskDescription.Builder

Set the background color to use in the TaskDescription.

Parameters
color Int: A color to override the theme's background color. The color must be opaque.
Return
ActivityManager.TaskDescription.Builder The same instance of the builder. This value cannot be null.

setIcon

Added in API level 33
fun setIcon(iconRes: Int): ActivityManager.TaskDescription.Builder

Set the drawable resource of the icon to use in the TaskDescription.

Parameters
iconRes Int: A drawable resource of an icon that represents the current state of this activity.
Return
ActivityManager.TaskDescription.Builder The same instance of the builder. This value cannot be null.

setLabel

Added in API level 33
fun setLabel(label: String?): ActivityManager.TaskDescription.Builder

Set the label to use in the TaskDescription.

Parameters
label String?: A label and description of the current state of this activity. This value may be null.
Return
ActivityManager.TaskDescription.Builder The same instance of the builder. This value cannot be null.

setNavigationBarColor

Added in API level 33
fun setNavigationBarColor(color: Int): ActivityManager.TaskDescription.Builder

Set the navigation bar color to use in the TaskDescription.

Parameters
color Int: A color to override the theme's navigation bar color.
Return
ActivityManager.TaskDescription.Builder The same instance of the builder. This value cannot be null.

setPrimaryColor

Added in API level 33
fun setPrimaryColor(color: Int): ActivityManager.TaskDescription.Builder

Set the primary color to use in the TaskDescription.

Parameters
color Int: A color to override the theme's primary color. The color must be opaque.
Return
ActivityManager.TaskDescription.Builder The same instance of the builder. This value cannot be null.

setStatusBarColor

Added in API level 33
fun setStatusBarColor(color: Int): ActivityManager.TaskDescription.Builder

Set the status bar color to use in the TaskDescription.

Parameters
color Int: A color to override the theme's status bar color.
Return
ActivityManager.TaskDescription.Builder The same instance of the builder. This value cannot be null.