public static class Intent.ShortcutIconResource extends Object implements Parcelable
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<Intent.ShortcutIconResource> |
CREATOR
Used to read a ShortcutIconResource from a Parcel.
|
String |
packageName
The package name of the application containing the icon.
|
String |
resourceName
The resource name of the icon, including package, name and type.
|
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description |
---|
Intent.ShortcutIconResource() |
Modifier and Type | Method and Description |
---|---|
int |
describeContents()
No special parcel contents.
|
static Intent.ShortcutIconResource |
fromContext(Context context,
int resourceId)
Creates a new ShortcutIconResource for the specified context and resource
identifier.
|
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.
|
public String packageName
public String resourceName
public static final Parcelable.Creator<Intent.ShortcutIconResource> CREATOR
public static Intent.ShortcutIconResource fromContext(Context context, int resourceId)
context
- The context of the application.resourceId
- The resource idenfitier for the icon.public int describeContents()
describeContents
in interface Parcelable
public void writeToParcel(Parcel dest, int flags)
Parcelable
writeToParcel
in interface Parcelable
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.PARCELABLE_WRITE_RETURN_VALUE
.public String toString()
Object
getClass().getName() + '@' + Integer.toHexString(hashCode())
See Writing a useful
toString
method
if you intend implementing your own toString
method.