Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7e1b835a authored by Makoto Onuki's avatar Makoto Onuki Committed by android-build-merger
Browse files

App Shortcut: Clarify which attributes must be resources am: 104f8053 am: 2a3fe7d9

am: b0fd5ba1

Change-Id: I4780d09f8b692dbe76f1726a436f9693281fd488
parents b098dc6b b0fd5ba1
Loading
Loading
Loading
Loading
+17 −4
Original line number Original line Diff line number Diff line
@@ -193,7 +193,11 @@ import java.util.List;
 * The following list includes descriptions for the different attributes within a static shortcut:
 * The following list includes descriptions for the different attributes within a static shortcut:
 * <dl>
 * <dl>
 *   <dt>{@code android:shortcutId}</dt>
 *   <dt>{@code android:shortcutId}</dt>
 *   <dd>Mandatory shortcut ID</dd>
 *   <dd>Mandatory shortcut ID.
 *   <p>
 *   This must be a string literal.
 *   A resource string, such as <code>@string/foo</code>, cannot be used.
 *   </dd>
 *
 *
 *   <dt>{@code android:enabled}</dt>
 *   <dt>{@code android:enabled}</dt>
 *   <dd>Default is {@code true}.  Can be set to {@code false} in order
 *   <dd>Default is {@code true}.  Can be set to {@code false} in order
@@ -206,15 +210,24 @@ import java.util.List;
 *
 *
 *   <dt>{@code android:shortcutShortLabel}</dt>
 *   <dt>{@code android:shortcutShortLabel}</dt>
 *   <dd>Mandatory shortcut short label.
 *   <dd>Mandatory shortcut short label.
 *   See {@link ShortcutInfo.Builder#setShortLabel(CharSequence)}.</dd>
 *   See {@link ShortcutInfo.Builder#setShortLabel(CharSequence)}.
 *   <p>
 *   This must be a resource string, such as <code>@string/shortcut_label</code>.
 *   </dd>
 *
 *
 *   <dt>{@code android:shortcutLongLabel}</dt>
 *   <dt>{@code android:shortcutLongLabel}</dt>
 *   <dd>Shortcut long label.
 *   <dd>Shortcut long label.
 *   See {@link ShortcutInfo.Builder#setLongLabel(CharSequence)}.</dd>
 *   See {@link ShortcutInfo.Builder#setLongLabel(CharSequence)}.
 *   <p>
 *   This must be a resource string, such as <code>@string/shortcut_long_label</code>.
 *   </dd>
 *
 *
 *   <dt>{@code android:shortcutDisabledMessage}</dt>
 *   <dt>{@code android:shortcutDisabledMessage}</dt>
 *   <dd>When {@code android:enabled} is set to
 *   <dd>When {@code android:enabled} is set to
 *   {@code false}, this attribute is used to display a custom disabled message.</dd>
 *   {@code false}, this attribute is used to display a custom disabled message.
 *   <p>
 *   This must be a resource string, such as <code>@string/shortcut_disabled_message</code>.
 *   </dd>
 *
 *
 *   <dt>{@code intent}</dt>
 *   <dt>{@code intent}</dt>
 *   <dd>Intent to launch when the user selects the shortcut.
 *   <dd>Intent to launch when the user selects the shortcut.
+3 −1
Original line number Original line Diff line number Diff line
@@ -390,7 +390,9 @@ setComponent()} method.</dd>
    <dd>The package part of the component name, as per the {@link
    <dd>The package part of the component name, as per the {@link
android.content.Intent#setComponent setComponent()} method.</dd>
android.content.Intent#setComponent setComponent()} method.</dd>
</dl>
</dl>

<p class="note"><strong>Note: </strong>You must use string literals as the values for these
intent attributes. You cannot use resource strings, such as <code>@string/foo</code>, to define the attributes.
</p>




<h2 id="Activity">Creating a Preference Activity</h2>
<h2 id="Activity">Creating a Preference Activity</h2>