belongs to Maven artifact com.android.support:support-compat:28.0.0-alpha1
ShortcutInfoCompat
public
class
ShortcutInfoCompat
extends Object
java.lang.Object | |
↳ | android.support.v4.content.pm.ShortcutInfoCompat |
Helper for accessing features in ShortcutInfo
.
Summary
Nested classes | |
---|---|
class |
ShortcutInfoCompat.Builder
Builder class for |
Public methods | |
---|---|
ComponentName
|
getActivity()
Return the target activity. |
CharSequence
|
getDisabledMessage()
Return the message that should be shown when the user attempts to start a shortcut that is disabled. |
String
|
getId()
Returns the ID of a shortcut. |
Intent
|
getIntent()
Returns the intent that is executed when the user selects this shortcut. |
Intent[]
|
getIntents()
Return the intent set with |
CharSequence
|
getLongLabel()
Return the long description of a shortcut. |
CharSequence
|
getShortLabel()
Return the short description of a shortcut. |
ShortcutInfo
|
toShortcutInfo()
|
Inherited methods | |
---|---|
From
class
java.lang.Object
|
Public methods
getActivity
ComponentName getActivity ()
Return the target activity.
This has nothing to do with the activity that this shortcut will launch. Launcher apps should show the launcher icon for the returned activity alongside this shortcut.
Returns | |
---|---|
ComponentName |
See also:
getDisabledMessage
CharSequence getDisabledMessage ()
Return the message that should be shown when the user attempts to start a shortcut that is disabled.
Returns | |
---|---|
CharSequence |
See also:
getId
String getId ()
Returns the ID of a shortcut.
Shortcut IDs are unique within each publisher app and must be stable across
devices so that shortcuts will still be valid when restored on a different device.
See ShortcutManager
for details.
Returns | |
---|---|
String |
getIntent
Intent getIntent ()
Returns the intent that is executed when the user selects this shortcut. If setIntents() was used, then return the last intent in the array.
Returns | |
---|---|
Intent |
See also:
getIntents
Intent[] getIntents ()
Return the intent set with setIntents(Intent[])
.
Returns | |
---|---|
Intent[] |
See also:
getLongLabel
CharSequence getLongLabel ()
Return the long description of a shortcut.
Returns | |
---|---|
CharSequence |
See also:
getShortLabel
CharSequence getShortLabel ()
Return the short description of a shortcut.
Returns | |
---|---|
CharSequence |
See also:
toShortcutInfo
ShortcutInfo toShortcutInfo ()
Returns | |
---|---|
ShortcutInfo |
ShortcutInfo object from this compat object.
|
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2024-04-11 UTC.