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

Public Constructors

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

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)

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)

Creates the TaskDescription to the specified values.

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

public ActivityManager.TaskDescription ()

Creates an empty TaskDescription.

public ActivityManager.TaskDescription (ActivityManager.TaskDescription td)

Creates a copy of another TaskDescription.

Public Methods

public int describeContents ()

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 ()

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

public String getLabel ()

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

public int getPrimaryColor ()

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

public void readFromParcel (Parcel source)

public String toString ()

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)

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.