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

Commit d4e3825a authored by Scott Rowe's avatar Scott Rowe Committed by Android Git Automerger
Browse files

am 1b2cf3f8: am cd796536: Merge "docs: b/18119632 isGame, b/18119595 banner" into lmp-docs

* commit '1b2cf3f8':
  docs: b/18119632 isGame, b/18119595 banner
parents 2997285f 1b2cf3f8
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -41,6 +41,8 @@ page.title=UI Patterns for TV
      language, you must provide versions of the banner image for each supported language.</li>
</ul>

<p>See <a href="{@docRoot}training/tv/start/start.html#banner">Provide a home screen banner</a>
in Get Started with TV Apps for more information.</p>

<h3>Recommendation Icons</h3>

+24 −0
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@ parent.link=manifest-intro.html
          android:<a href="#reparent">allowTaskReparenting</a>=["true" | "false"]
          android:<a href="#always">alwaysRetainTaskState</a>=["true" | "false"]
          android:<a href="#autoremrecents">autoRemoveFromRecents</a>=["true" | "false"]
          android:<a href="#banner">banner</a>="<i>drawable resource</i>"
          android:<a href="#clear">clearTaskOnLaunch</a>=["true" | "false"]
          android:<a href="#config">configChanges</a>=["mcc", "mnc", "locale",
                                 "touchscreen", "keyboard", "keyboardHidden",
@@ -153,6 +154,29 @@ automatically removed from the overview screen. This overrides the caller's use
"{@code true}" or "{@code false}".</dd>


<dt><a name="banner"></a>{@code android:banner}</dt>
<dd>A <a href="{@docRoot}guide/topics/resources/drawable-resource.html">drawable resource</a>
providing an extended graphical banner for its associated item. Use with the
{@code &lt;activity&gt;} tag to supply a default banner for a specific activity, or with the
<a href="{@docRoot}guide/topics/manifest/application-element.html"><code>&lt;application&gt;</code></a>
tag to supply a banner for all application activities.

<p>The system uses the banner to represent an app in
the Android TV home screen. Since the banner is displayed only in the home screen, it
should only be specified by applications with an activity that handles the
{@link android.content.Intent#CATEGORY_LEANBACK_LAUNCHER} intent.</p>

<p>This attribute must be set as a reference to a drawable resource containing
the image (for example {@code "&#64;drawable/banner"}). There is no default banner.
</p>

<p>
See <a href="{@docRoot}design/tv/patterns.html#banner">
Banners</a> in the UI Patterns for TV design guide, and <a href="{@docRoot}training/tv/start/start.html#banner">
Provide a home screen banner</a> in Get Started with TV Apps for more information.
</p></dd>


<dt><a name="clear"></a>{@code android:clearTaskOnLaunch}</dt>
<dd>Whether or not all activities will be removed from the task, except for
the root activity, whenever it is re-launched from the home screen &mdash;
+102 −72
Original line number Diff line number Diff line
@@ -7,12 +7,14 @@ page.title=&lt;application&gt;
<dd><pre class="stx">&lt;application android:<a href="#reparent">allowTaskReparenting</a>=["true" | "false"]
             android:<a href="#allowbackup">allowBackup</a>=["true" | "false"]
             android:<a href="#agent">backupAgent</a>="<i>string</i>"
             android:<a href="#banner">banner</a>="<i>drawable resource</i>"
             android:<a href="#debug">debuggable</a>=["true" | "false"]
             android:<a href="#desc">description</a>="<i>string resource</i>"
             android:<a href="#enabled">enabled</a>=["true" | "false"]
             android:<a href="#code">hasCode</a>=["true" | "false"]
             android:<a href="#hwaccel">hardwareAccelerated</a>=["true" | "false"]
             android:<a href="#icon">icon</a>="<i>drawable resource</i>"
             android:<a href="#isGame">isGame</a>=["true" | "false"]
             android:<a href="#killrst">killAfterRestore</a>=["true" | "false"]
             android:<a href="#largeHeap">largeHeap</a>=["true" | "false"]
             android:<a href="#label">label</a>="<i>string resource</i>"
@@ -103,6 +105,28 @@ element.
There is no default.  The name must be specified.
</p></dd>

<dt><a name="banner"></a>{@code android:banner}</dt>
<dd>A <a href="{@docRoot}guide/topics/resources/drawable-resource.html">drawable resource</a>
providing an extended graphical banner for its associated item. Use with the
{@code &lt;application&gt;} tag to supply a default banner for all application activities, or with the
<a href="{@docRoot}guide/topics/manifest/activity-element.html"><code>&lt;activity&gt;</code></a>
tag to supply a banner for a specific activity.

<p>The system uses the banner to represent an app in
the Android TV home screen. Since the banner is displayed only in the home screen, it
should only be specified by applications with an activity that handles the
{@link android.content.Intent#CATEGORY_LEANBACK_LAUNCHER} intent.</p>

<p>This attribute must be set as a reference to a drawable resource containing
the image (for example {@code "&#64;drawable/banner"}). There is no default banner.
</p>

<p>
See <a href="{@docRoot}design/tv/patterns.html#banner">
Banners</a> in the UI Patterns for TV design guide, and <a href="{@docRoot}training/tv/start/start.html#banner">
Provide a home screen banner</a> in Get Started with TV Apps for more information.
</p></dd>

<dt><a name="debug"></a>{@code android:debuggable}</dt>
<dd>Whether or not the application can be debugged, even when running
on a device in user mode &mdash; {@code "true"} if it can be, and {@code "false"}
@@ -172,9 +196,15 @@ each of the application's components. See the individual

<p>
This attribute must be set as a reference to a drawable resource containing
the image (for example {@code "@drawable/icon"}). There is no default icon.
the image (for example {@code "&#64;drawable/icon"}). There is no default icon.
</p></dd>

<dt><a name="isGame"></a>{@code android:isGame}</dt>
<dd>Whether or not the application is a game. The system may group together applications classifed
as games or display them separately from other applications.

<p>The default is {@code false}.</p></dd>

<dt><a name="killrst"></a>{@code android:killAfterRestore}</dt>
<dd>Whether the application in question should be terminated after its
settings have been restored during a full-system restore operation.
@@ -221,7 +251,7 @@ it can also be set as a raw string.
<dt><a name="logo"></a>{@code android:logo}</dt>
<dd>A logo for the application as whole, and the default logo for activities.
<p>This attribute must be set as a reference to a drawable resource containing
the image (for example {@code "@drawable/logo"}).  There is no default logo.</p></dd>
the image (for example {@code "&#64;drawable/logo"}).  There is no default logo.</p></dd>

<dt><a name="space"></a>{@code android:manageSpaceActivity}</dt>
<dd>The fully qualified name of an Activity subclass that the system
+12 −12
Original line number Diff line number Diff line
@@ -194,22 +194,22 @@ It includes a white controller on black background and a black controller on whi

<p>There are a some special things games should include in the Android manifest.</p>

<h3 id="Launcher">Show your game in the launcher</h3>
<h3 id="Launcher">Show your game on the home screen</h3>
<p>
  The Android TV launcher home screen displays games in a separate row from regular apps.
  To make your game appear in the list of games, add the
  <a href="{@docRoot}guide/topics/manifest/meta-data-element.html"
  ><code>&lt;meta-data></code></a> tag in your app manifest with <code>android:name</code>
  set to <code>"isGame"</code> and <code>android:value</code>
  set to <code>"true"</code>. For example:
  The Android TV home screen displays games in a separate row from regular apps.
  To make your game appear in the list of games, set the
  <a href="{@docRoot}guide/topics/manifest/application-element.html#isGame">
  {@code android:isGame}</a> attribute to <code>"true"</code> in your app manifest's
  <a href="{@docRoot}guide/topics/manifest/application-element.html"><code>&lt;application&gt;</code>
  </a> tag. For example:
</p>

<pre class="fragment">
&lt;application&gt;
&lt;application
    ...
  &lt;meta-data android:name="isGame" android:value="true" &gt;
    android:isGame="true"
    ...
&lt;/application&gt;
&gt;
</pre>


+30 −1
Original line number Diff line number Diff line
@@ -100,7 +100,8 @@ startpage=true
<p>The following code snippet shows how to include this intent filter in your manifest:</p>

<pre>
&lt;application&gt;
&lt;application
  android:banner="&#64;drawable/banner" &gt;
  ...
  &lt;activity
    android:name=&quot;com.example.android.MainActivity&quot;
@@ -141,6 +142,34 @@ startpage=true
  "{@docRoot}training/tv/start/layouts.html">Building TV Layouts</a>.
</p>

<h3 id="banner">Provide a home screen banner</h3>

<p>
  An application must provide a home screen banner if it includes a Leanback launcher intent
  filter. The banner is the app launch point that appears on the home screen in the apps and
  games rows. Desribe the banner in the manifest as follows:
</p>

<pre>
&lt;application
    . . .
    android:banner="&#64;drawable/banner" &gt;
    . . .
&lt;/application&gt;
</pre>

<p>
  Use the <a href="{@docRoot}guide/topics/manifest/application-element.html#banner">{@code android:banner}</a>
  attribute with the <a href="{@docRoot}guide/topics/manifest/application.html"><code>&lt;application&gt;</code></a>
  tag to supply a default banner for all application activities, or with the
  <a href="{@docRoot}guide/topics/manifest/activity-element.html"><code>&lt;activity&gt;</code></a>
  tag to supply a banner for a specific activity.
</p>

<p>
  See <a href="{@docRoot}design/tv/patterns.html#banner">Banners</a> in the UI Patterns for TV
  design guide.
</p>

<h3 id="tv-libraries">Add TV support libraries</h3>