Skip to content

Most visited

Recently visited

navigation
Added in API level 1

Intent.ShortcutIconResource

public static class Intent.ShortcutIconResource
extends Object implements Parcelable

java.lang.Object
   ↳ android.content.Intent.ShortcutIconResource


Represents a shortcut/live folder icon resource.

See also:

Summary

Inherited constants

From interface android.os.Parcelable

Fields

public static final Creator<Intent.ShortcutIconResource> CREATOR

Used to read a ShortcutIconResource from a Parcel.

public String packageName

The package name of the application containing the icon.

public String resourceName

The resource name of the icon, including package, name and type.

Public constructors

Intent.ShortcutIconResource()

Public methods

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.

Inherited methods

From class java.lang.Object
From interface android.os.Parcelable

Fields

CREATOR

Added in API level 1
Creator<Intent.ShortcutIconResource> CREATOR

Used to read a ShortcutIconResource from a Parcel.

packageName

Added in API level 1
String packageName

The package name of the application containing the icon.

resourceName

Added in API level 1
String resourceName

The resource name of the icon, including package, name and type.

Public constructors

Intent.ShortcutIconResource

Added in API level 1
Intent.ShortcutIconResource ()

Public methods

describeContents

Added in API level 1
int describeContents ()

No special parcel contents.

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

fromContext

Added in API level 1
Intent.ShortcutIconResource fromContext (Context context, 
                int resourceId)

Creates a new ShortcutIconResource for the specified context and resource identifier.

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.``

toString

Added in API level 1
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
String a printable representation of this object.

writeToParcel

Added in API level 1
void writeToParcel (Parcel dest, 
                int flags)

Flatten this object in to a Parcel.

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.
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.