Android APIs
public static class

ActivityManager.TaskDescription

extends Object
implements Parcelable
java.lang.Object
   ↳ android.app.ActivityManager.TaskDescription

Class Overview

Information you can set and retrieve about the current activity within the recent task list.

Summary

[Expand]
Inherited Constants
From interface android.os.Parcelable
Fields
public static final Creator<ActivityManager.TaskDescription> CREATOR
Public Constructors
ActivityManager.TaskDescription(String label, Bitmap icon, int colorPrimary)
Creates the TaskDescription to the specified values.
ActivityManager.TaskDescription(String label, Bitmap icon)
Creates the TaskDescription to the specified values.
ActivityManager.TaskDescription(String label)
Creates the TaskDescription to the specified values.
ActivityManager.TaskDescription()
Creates an empty TaskDescription.
ActivityManager.TaskDescription(ActivityManager.TaskDescription td)
Creates a copy of another TaskDescription.
Public Methods
int describeContents()
Describe the kinds of special objects contained in this Parcelable's marshalled representation.
Bitmap getIcon()
String getLabel()
int getPrimaryColor()
void readFromParcel(Parcel source)
String toString()
Returns a string containing a concise, human-readable description of this object.
void writeToParcel(Parcel dest, int flags)
Flatten this object in to a Parcel.
[Expand]
Inherited Methods
From class java.lang.Object
From interface android.os.Parcelable

Fields

public static final Creator<ActivityManager.TaskDescription> CREATOR

Added in API level 21

Public Constructors

public ActivityManager.TaskDescription (String label, Bitmap icon, int colorPrimary)

Added in API level 21

Creates the TaskDescription to the specified values.

Parameters
label A label and description of the current state of this task.
icon An icon that represents the current state of this task.
colorPrimary A color to override the theme's primary color. This color must be opaque.

public ActivityManager.TaskDescription (String label, Bitmap icon)

Added in API level 21

Creates the TaskDescription to the specified values.

Parameters
label A label and description of the current state of this activity.
icon An icon that represents the current state of this activity.

public ActivityManager.TaskDescription (String label)

Added in API level 21

Creates the TaskDescription to the specified values.

Parameters
label A label and description of the current state of this activity.

public ActivityManager.TaskDescription ()

Added in API level 21

Creates an empty TaskDescription.

public ActivityManager.TaskDescription (ActivityManager.TaskDescription td)

Added in API level 21

Creates a copy of another TaskDescription.

Public Methods

public int describeContents ()

Added in API level 21

Describe the kinds of special objects contained in this Parcelable's marshalled representation.

Returns
  • a bitmask indicating the set of special object types marshalled by the Parcelable.

public Bitmap getIcon ()

Added in API level 21

Returns
  • The icon that represents the current state of this task.

public String getLabel ()

Added in API level 21

Returns
  • The label and description of the current state of this task.

public int getPrimaryColor ()

Added in API level 21

Returns
  • The color override on the theme's primary color.

public void readFromParcel (Parcel source)

Added in API level 21

public String toString ()

Added in API level 21

Returns a string containing a concise, human-readable description of this object. Subclasses are encouraged to override this method and provide an implementation that takes into account the object's type and data. The default implementation is equivalent to the following expression:

   getClass().getName() + '@' + Integer.toHexString(hashCode())

See Writing a useful toString method if you intend implementing your own toString method.

Returns
  • a printable representation of this object.

public void writeToParcel (Parcel dest, int flags)

Added in API level 21

Flatten this object in to a Parcel.

Parameters
dest The Parcel in which the object should be written.
flags Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE.