public static class Intent.ShortcutIconResource
extends Object implements Parcelable
| java.lang.Object | |
| android.content.Intent.ShortcutIconResource | |
表示快捷方式/活动文件夹图标资源。
也可以看看:
Inherited constants |
|---|
android.os.Parcelable
|
Fields |
|
|---|---|
public static final Creator<Intent.ShortcutIconResource> |
CREATOR 用于从包中读取ShortcutIconResource。 |
public String |
packageName 包含该图标的应用程序的包名称。 |
public String |
resourceName 图标的资源名称,包括包裹,名称和类型。 |
Public constructors |
|
|---|---|
Intent.ShortcutIconResource() |
|
公共方法(Public methods) |
|
|---|---|
int |
describeContents() 没有特别的包裹内容。 |
static Intent.ShortcutIconResource |
fromContext(Context context, int resourceId) 为指定的上下文和资源标识符创建一个新的ShortcutIconResource。 |
String |
toString() 返回对象的字符串表示形式。 |
void |
writeToParcel(Parcel dest, int flags) 将此对象平铺到一个包裹中。 |
继承方法(Inherited methods) |
|
|---|---|
java.lang.Object
|
|
android.os.Parcelable
|
|
Creator<Intent.ShortcutIconResource> CREATOR
用于从包中读取ShortcutIconResource。
int describeContents ()
没有特别的包裹内容。
| 返回(Returns) | |
|---|---|
int |
a bitmask indicating the set of special object types marshaled by this Parcelable object instance. |
Intent.ShortcutIconResource fromContext (Context context, int resourceId)
为指定的上下文和资源标识符创建一个新的ShortcutIconResource。
| 参数(Parameters) | |
|---|---|
context |
Context: The context of the application. |
resourceId |
int: The resource identifier for the icon. |
| 返回(Returns) | |
|---|---|
Intent.ShortcutIconResource |
A new ShortcutIconResource with the specified's context package name and icon resource identifier.`` |
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. |