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 | |
---|---|
Builder() |
Public methods | |
---|---|
ActivityManager.TaskDescription |
build() Build the TaskDescription. |
ActivityManager.TaskDescription.Builder |
setBackgroundColor(color: Int) Set the background color to use in the TaskDescription. |
ActivityManager.TaskDescription.Builder |
Set the drawable resource of the icon to use in the TaskDescription. |
ActivityManager.TaskDescription.Builder |
Set the label to use in the TaskDescription. |
ActivityManager.TaskDescription.Builder |
Set the navigation bar color to use in the TaskDescription. |
ActivityManager.TaskDescription.Builder |
setPrimaryColor(color: Int) Set the primary color to use in the TaskDescription. |
ActivityManager.TaskDescription.Builder |
setStatusBarColor(color: Int) Set the status bar color to use in the TaskDescription. |
Public constructors
Builder
Builder()
Public methods
build
fun build(): ActivityManager.TaskDescription
Build the TaskDescription.
Return | |
---|---|
ActivityManager.TaskDescription |
the TaskDescription object. This value cannot be null . |
setBackgroundColor
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
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
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
fun setNavigationBarColor(: 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
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
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 . |