public static class ActivityManager.TaskDescription
extends Object implements Parcelable
| java.lang.Object | |
| android.app.ActivityManager.TaskDescription | |
您可以在最近的任务列表中设置和检索有关当前活动的信息。
Inherited constants |
|---|
android.os.Parcelable
|
Fields |
|
|---|---|
public static final Creator<ActivityManager.TaskDescription> |
CREATOR |
Public constructors |
|
|---|---|
ActivityManager.TaskDescription(String label, Bitmap icon, int colorPrimary) 将TaskDescription创建为指定的值。 |
|
ActivityManager.TaskDescription(String label, Bitmap icon) 将TaskDescription创建为指定的值。 |
|
ActivityManager.TaskDescription(String label) 将TaskDescription创建为指定的值。 |
|
ActivityManager.TaskDescription() 创建一个空的TaskDescription。 |
|
ActivityManager.TaskDescription(ActivityManager.TaskDescription td) 创建另一个TaskDescription的副本。 |
|
公共方法(Public methods) |
|
|---|---|
int |
describeContents() 描述此Parcelable实例的封送表示中包含的特殊对象的种类。 |
Bitmap |
getIcon() |
String |
getLabel() |
int |
getPrimaryColor() |
void |
readFromParcel(Parcel source) |
String |
toString() 返回对象的字符串表示形式。 |
void |
writeToParcel(Parcel dest, int flags) 将此对象平铺到一个包裹中。 |
继承方法(Inherited methods) |
|
|---|---|
java.lang.Object
|
|
android.os.Parcelable
|
|
ActivityManager.TaskDescription (String label, Bitmap icon, int colorPrimary)
将TaskDescription创建为指定的值。
| 参数(Parameters) | |
|---|---|
label |
String: A label and description of the current state of this task. |
icon |
Bitmap: An icon that represents the current state of this task. |
colorPrimary |
int: A color to override the theme's primary color. This color must be opaque. |
ActivityManager.TaskDescription (String label, Bitmap icon)
将TaskDescription创建为指定的值。
| 参数(Parameters) | |
|---|---|
label |
String: A label and description of the current state of this activity. |
icon |
Bitmap: An icon that represents the current state of this activity. |
ActivityManager.TaskDescription (String label)
将TaskDescription创建为指定的值。
| 参数(Parameters) | |
|---|---|
label |
String: A label and description of the current state of this activity. |
ActivityManager.TaskDescription ()
创建一个空的TaskDescription。
ActivityManager.TaskDescription (ActivityManager.TaskDescription td)
创建另一个TaskDescription的副本。
| 参数(Parameters) | |
|---|---|
td |
ActivityManager.TaskDescription
|
int describeContents ()
描述此Parcelable实例的封送表示中包含的特殊对象的种类。 例如,如果对象将在writeToParcel(Parcel, int)的输出中包含writeToParcel(Parcel, int) ,则此方法的返回值必须包含CONTENTS_FILE_DESCRIPTOR位。
| 返回(Returns) | |
|---|---|
int |
a bitmask indicating the set of special object types marshaled by this Parcelable object instance. |
Bitmap getIcon ()
| 返回(Returns) | |
|---|---|
Bitmap |
The icon that represents the current state of this task. |
String getLabel ()
| 返回(Returns) | |
|---|---|
String |
The label and description of the current state of this task. |
int getPrimaryColor ()
| 返回(Returns) | |
|---|---|
int |
The color override on the theme's primary color. |
void readFromParcel (Parcel source)
| 参数(Parameters) | |
|---|---|
source |
Parcel
|
String toString ()
返回对象的字符串表示形式。 通常, toString方法返回一个“文本表示”该对象的字符串。 结果应该是一个简洁但内容丰富的表述,对于一个人来说很容易阅读。 建议所有子类重写此方法。
类Object的toString方法返回一个字符串,其中包含对象为实例的类的名称,符号字符“ @ ”以及对象的哈希代码的无符号十六进制表示形式。 换句话说,这个方法返回一个字符串,其值等于:
getClass().getName() + '@' + Integer.toHexString(hashCode())
| 返回(Returns) | |
|---|---|
String |
a string representation of the object. |
void writeToParcel (Parcel dest, int flags)
将此对象平铺到一个包裹中。
| 参数(Parameters) | |
|---|---|
dest |
Parcel: The Parcel in which the object should be written. |
flags |
int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE. |