diff options
Diffstat (limited to 'docs/html/training')
-rw-r--r-- | docs/html/training/basics/firstapp/building-ui.jd | 2 | ||||
-rw-r--r-- | docs/html/training/basics/firstapp/creating-project.jd | 2 | ||||
-rw-r--r-- | docs/html/training/basics/firstapp/starting-activity.jd | 2 | ||||
-rw-r--r-- | docs/html/training/tv/discovery/index.jd | 3 | ||||
-rw-r--r-- | docs/html/training/tv/games/index.jd | 30 | ||||
-rw-r--r-- | docs/html/training/tv/index.jd | 7 | ||||
-rw-r--r-- | docs/html/training/tv/playback/index.jd | 2 | ||||
-rw-r--r-- | docs/html/training/tv/start/index.jd | 1 | ||||
-rw-r--r-- | docs/html/training/tv/start/start.jd | 31 | ||||
-rw-r--r-- | docs/html/training/tv/tif/index.jd | 2 | ||||
-rw-r--r-- | docs/html/training/wearables/apps/bt-debugging.jd | 3 | ||||
-rw-r--r-- | docs/html/training/wearables/apps/layouts.jd | 12 | ||||
-rw-r--r-- | docs/html/training/wearables/data-layer/index.jd | 2 | ||||
-rw-r--r-- | docs/html/training/wearables/notifications/pages.jd | 13 | ||||
-rw-r--r-- | docs/html/training/wearables/notifications/voice-input.jd | 7 |
15 files changed, 79 insertions, 40 deletions
diff --git a/docs/html/training/basics/firstapp/building-ui.jd b/docs/html/training/basics/firstapp/building-ui.jd index c082642..0430cdd 100644 --- a/docs/html/training/basics/firstapp/building-ui.jd +++ b/docs/html/training/basics/firstapp/building-ui.jd @@ -1,7 +1,7 @@ page.title=Building a Simple User Interface trainingnavtop=true -page.tags=ui, views, layouts, widgets, string resources +page.tags=ui helpoutsWidget=true @jd:body diff --git a/docs/html/training/basics/firstapp/creating-project.jd b/docs/html/training/basics/firstapp/creating-project.jd index 418eb68..2e06103 100644 --- a/docs/html/training/basics/firstapp/creating-project.jd +++ b/docs/html/training/basics/firstapp/creating-project.jd @@ -1,6 +1,6 @@ page.title=Creating an Android Project -page.tags=eclipse adt, sdk tools, project setup +page.tags=project setup helpoutsWidget=true trainingnavtop=true diff --git a/docs/html/training/basics/firstapp/starting-activity.jd b/docs/html/training/basics/firstapp/starting-activity.jd index f9dcba4..71f66dd 100644 --- a/docs/html/training/basics/firstapp/starting-activity.jd +++ b/docs/html/training/basics/firstapp/starting-activity.jd @@ -4,7 +4,7 @@ parent.link=index.html trainingnavtop=true -page.tags=input events, intents, activity lifecycle +page.tags=intents helpoutsWidget=true @jd:body diff --git a/docs/html/training/tv/discovery/index.jd b/docs/html/training/tv/discovery/index.jd index fbc8c9f..5849149 100644 --- a/docs/html/training/tv/discovery/index.jd +++ b/docs/html/training/tv/discovery/index.jd @@ -1,4 +1,5 @@ -page.title=Helping Users Find Content on TV +page.title=Helping Users Find Your Content on TV +page.tags="tv", "leanback" startpage=true diff --git a/docs/html/training/tv/games/index.jd b/docs/html/training/tv/games/index.jd index 2f510a9..5276d7f 100644 --- a/docs/html/training/tv/games/index.jd +++ b/docs/html/training/tv/games/index.jd @@ -1,5 +1,7 @@ page.title=Building TV Games -page.tags="controller" +page.tags="tv", "games", "controller" +page.image=images/games/game-controller-buttons_2x_crop.png +page.metaDescription=How to bring your games to Android TV, including recommendations and examples. page.article=true @jd:body @@ -180,7 +182,7 @@ href="{@docRoot}training/game-controllers/controller-input.html#button" It includes a white controller on black background and a black controller on white background (shown in figure 1), as a PNG file and an Adobe® Illustrator® file.</p> -<img src="{@docRoot}images/games/game-controller-buttons_2x.png" width="700" +<img itemprop="image" src="{@docRoot}images/games/game-controller-buttons_2x.png" width="700" srcset="{@docRoot}images/games/game-controller-buttons_2x.png 2x, {@docRoot}images/games/game-controller-buttons.png 1x" /> <p class="img-caption"><b>Figure 1.</b> Example controller instructions using the @@ -194,22 +196,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><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><application></code> + </a> tag. For example: </p> <pre class="fragment"> -<application> - ... - <meta-data android:name="isGame" android:value="true" > - ... -</application> +<application + ... + android:isGame="true" + ... +> </pre> diff --git a/docs/html/training/tv/index.jd b/docs/html/training/tv/index.jd index 56667a9..d52e1e8 100644 --- a/docs/html/training/tv/index.jd +++ b/docs/html/training/tv/index.jd @@ -1,8 +1,11 @@ page.title=Building Apps for TV page.trainingcourse=true - +page.metaDescription=Starting point for building apps and games for Android TV, with guidelines, information, and examples. +page.image=design/tv/images/focus.png @jd:body -<p>These classes teach you how to build apps for TV devices.</p>
\ No newline at end of file +<p>These classes teach you how to build apps for TV devices.</p> + +<p class="note"><strong>Note:</strong> For details on how to publish your TV apps in Google Play, see <a href="{docRoot}distribute/googleplay/tv.html">Distributing to Android TV</a>.</p>
\ No newline at end of file diff --git a/docs/html/training/tv/playback/index.jd b/docs/html/training/tv/playback/index.jd index 118fc6c..09c3f24 100644 --- a/docs/html/training/tv/playback/index.jd +++ b/docs/html/training/tv/playback/index.jd @@ -1,5 +1,5 @@ page.title=Building TV Playback Apps -page.tags="leanback" +page.tags="tv","leanback" startpage=true diff --git a/docs/html/training/tv/start/index.jd b/docs/html/training/tv/start/index.jd index ceefea1..fb478a8 100644 --- a/docs/html/training/tv/start/index.jd +++ b/docs/html/training/tv/start/index.jd @@ -1,4 +1,5 @@ page.title=Building TV Apps +page.tags="tv", "leanback" startpage=true @jd:body diff --git a/docs/html/training/tv/start/start.jd b/docs/html/training/tv/start/start.jd index bebeedd..3b26abf 100644 --- a/docs/html/training/tv/start/start.jd +++ b/docs/html/training/tv/start/start.jd @@ -100,7 +100,8 @@ startpage=true <p>The following code snippet shows how to include this intent filter in your manifest:</p> <pre> -<application> +<application + android:banner="@drawable/banner" > ... <activity android:name="com.example.android.MainActivity" @@ -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> +<application + . . . + android:banner="@drawable/banner" > + . . . +</application> +</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><application></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><activity></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> diff --git a/docs/html/training/tv/tif/index.jd b/docs/html/training/tv/tif/index.jd index 4746e42..cde8ba7 100644 --- a/docs/html/training/tv/tif/index.jd +++ b/docs/html/training/tv/tif/index.jd @@ -1,5 +1,5 @@ page.title=Building Live TV Apps -page.tags=tif +page.tags="tv", "tif" page.article=true @jd:body diff --git a/docs/html/training/wearables/apps/bt-debugging.jd b/docs/html/training/wearables/apps/bt-debugging.jd index 8d09c43..98cf804 100644 --- a/docs/html/training/wearables/apps/bt-debugging.jd +++ b/docs/html/training/wearables/apps/bt-debugging.jd @@ -58,7 +58,8 @@ Target: connected </li> <li>Connect the handheld to your machine over USB and run: <pre> -adb forward tcp:4444 localabstract:/adb-hub; adb connect localhost:4444 +adb forward tcp:4444 localabstract:/adb-hub +adb connect localhost:4444 </pre> <p class="note"><b>Note</b>: You can use any available port that you have access to.</p> diff --git a/docs/html/training/wearables/apps/layouts.jd b/docs/html/training/wearables/apps/layouts.jd index e62d3e5..a35acb0 100644 --- a/docs/html/training/wearables/apps/layouts.jd +++ b/docs/html/training/wearables/apps/layouts.jd @@ -90,9 +90,10 @@ PendingIntent notificationPendingIntent = PendingIntent.getActivity(this, 0, not </ol> <h2 id="UiLibrary">Create Layouts with the Wearable UI Library</h2> <p> -There's an unofficial UI library that is automatically included when you create your wearable -app with the Android Studio Project Wizard. You can also add the library to your <code>build.gradle</code> +The Wearable UI Library is automatically included when you create your wearable +app with the Android Studio Project Wizard. You can also add this library to your <code>build.gradle</code> file with the following dependency declaration: +</p> <pre> dependencies { @@ -101,8 +102,11 @@ dependencies { compile 'com.google.android.gms:play-services-wearable:+' } </pre> -This library helps you build UIs that are designed for wearables. Here are some of the major classes: -</p> + +<p>This library helps you build UIs that are designed for wearables. For more information, see +<a href="{@docRoot}training/wearables/ui/index.html">Creating Custom UIs for Wear Devices</a>.</p> + +<p>Here are some of the major classes in the Wearable UI Library:</p> <ul> <li><code>BoxInsetLayout</code> - A FrameLayout that's aware of screen shape and can box its diff --git a/docs/html/training/wearables/data-layer/index.jd b/docs/html/training/wearables/data-layer/index.jd index 39d6561..6ef3fc7 100644 --- a/docs/html/training/wearables/data-layer/index.jd +++ b/docs/html/training/wearables/data-layer/index.jd @@ -8,7 +8,7 @@ page.title=Sending and Syncing Data <h2>Dependencies and prerequisites</h2> <ul> <li>Android 4.3 (API Level 18) or higher on the handset device</li> - <li>The latest version of <a href="{@docRoot}google/play">Google Play services</a></li> + <li>The latest version of <a href="{@docRoot}google/play-services/index.html">Google Play services</a></li> <li>An Android Wear device or Wear AVD</li> </ul> </div> diff --git a/docs/html/training/wearables/notifications/pages.jd b/docs/html/training/wearables/notifications/pages.jd index d74c8ea..6315037 100644 --- a/docs/html/training/wearables/notifications/pages.jd +++ b/docs/html/training/wearables/notifications/pages.jd @@ -57,15 +57,14 @@ Notification secondPageNotification = .setStyle(secondPageStyle) .build(); -// Add second page with wearable extender and extend the main notification -Notification twoPageNotification = - new WearableExtender() - .addPage(secondPageNotification) - .extend(notificationBuilder) - .build(); +// Extend the notification builder with the second page +Notification notification = notificationBuilder + .extend(new NotificationCompat.WearableExtender() + .addPage(secondPageNotification)) + .build(); // Issue the notification notificationManager = NotificationManagerCompat.from(this); -notificationManager.notify(notificationId, twoPageNotification); +notificationManager.notify(notificationId, notification); </pre>
\ No newline at end of file diff --git a/docs/html/training/wearables/notifications/voice-input.jd b/docs/html/training/wearables/notifications/voice-input.jd index 4a27826..3ce1c80 100644 --- a/docs/html/training/wearables/notifications/voice-input.jd +++ b/docs/html/training/wearables/notifications/voice-input.jd @@ -37,7 +37,7 @@ so you can type replies instead.</p> <h2 id="VoiceInput">Define the Voice Input</h2> -<p>To create an action that supports voice input, create an instance of +<p>To create an action that supports voice input, create an instance of {@link android.support.v4.app.RemoteInput.Builder} that you can add to your notification action. This class's constructor accepts a string that the system uses as the key for the voice input, which you'll later use to retrieve the text of the @@ -166,9 +166,8 @@ which is referenced by the <code>EXTRA_VOICE_REPLY</code> key that is used in th private CharSequence getMessageText(Intent intent) { Bundle remoteInput = RemoteInput.getResultsFromIntent(intent); - if (remoteInput != null) { - return remoteInput.getCharSequence(EXTRA_VOICE_REPLY); - } + if (remoteInput != null) { + return remoteInput.getCharSequence(EXTRA_VOICE_REPLY); } return null; } |