Merge "Docs: Release Notes for Dev Preview 2" into mnc-io-docs
diff --git a/docs/html/auto/images/logos/auto/lincoln.png b/docs/html/auto/images/logos/auto/lincoln.png
new file mode 100644
index 0000000..0ade9fe
--- /dev/null
+++ b/docs/html/auto/images/logos/auto/lincoln.png
Binary files differ
diff --git a/docs/html/auto/images/logos/auto/mbenz.png b/docs/html/auto/images/logos/auto/mbenz.png
new file mode 100644
index 0000000..84deacd
--- /dev/null
+++ b/docs/html/auto/images/logos/auto/mbenz.png
Binary files differ
diff --git a/docs/html/auto/images/logos/auto/opel.png b/docs/html/auto/images/logos/auto/opel.png
index 7e25ed5..fcb7040 100644
--- a/docs/html/auto/images/logos/auto/opel.png
+++ b/docs/html/auto/images/logos/auto/opel.png
Binary files differ
diff --git a/docs/html/auto/images/logos/auto/renault.png b/docs/html/auto/images/logos/auto/renault.png
index d252aa3..2970430 100644
--- a/docs/html/auto/images/logos/auto/renault.png
+++ b/docs/html/auto/images/logos/auto/renault.png
Binary files differ
diff --git a/docs/html/auto/images/logos/auto/rsm.png b/docs/html/auto/images/logos/auto/rsm.png
new file mode 100644
index 0000000..fa0e56a
--- /dev/null
+++ b/docs/html/auto/images/logos/auto/rsm.png
Binary files differ
diff --git a/docs/html/auto/images/logos/auto/tata.png b/docs/html/auto/images/logos/auto/tata.png
new file mode 100644
index 0000000..dfc4a5f
--- /dev/null
+++ b/docs/html/auto/images/logos/auto/tata.png
Binary files differ
diff --git a/docs/html/auto/index.jd b/docs/html/auto/index.jd
index 843aabf..5b67641 100644
--- a/docs/html/auto/index.jd
+++ b/docs/html/auto/index.jd
@@ -507,7 +507,12 @@
width="120" height="120" class="img-logo" />
</a>
</div>
-
+ <div class="col-5">
+ <a href=" http://www.lincoln.com/">
+ <img src="{@docRoot}auto/images/logos/auto/lincoln.png"
+ width="120" height="120" class="img-logo" />
+ </a>
+ </div>
<div class="col-5">
<a href="http://www.mahindra.com/">
<img src="{@docRoot}auto/images/logos/auto/mahindra.png"
@@ -520,16 +525,22 @@
width="120" height="120" class="img-logo" />
</a>
</div>
+ </div>
+ <div class="cols cols-leftp">
<div class="col-5">
<a href="http://www.mazda.com/">
<img src="{@docRoot}auto/images/logos/auto/mazda.png"
width="120" height="120" class="img-logo" />
</a>
</div>
- </div>
- <div class="cols cols-leftp">
- <div class="col-5">
+ <div class="col-5">
+ <a href="http://www.mercedes-benz.com/">
+ <img src="{@docRoot}auto/images/logos/auto/mbenz.png"
+ width="120" height="120" class="img-logo" />
+ </a>
+ </div>
+ <div class="col-5">
<a href="http://www.mitsubishi-motors.com/">
<img src="{@docRoot}auto/images/logos/auto/mitsubishi.png"
width="120" height="120" class="img-logo" />
@@ -542,20 +553,22 @@
width="120" height="120" class="img-logo" />
</a>
</div>
+ </div>
+ <div class="cols cols-leftp">
<div class="col-5">
<a href="http://www.opel.com/">
<img src="{@docRoot}auto/images/logos/auto/opel.png"
width="120" height="120" class="img-logo" />
</a>
</div>
+
<div class="col-5">
<a href="http://www.peugeot.com/">
<img src="{@docRoot}auto/images/logos/auto/peugeot.png"
width="120" height="120" class="img-logo" />
</a>
</div>
- </div>
- <div class="cols cols-leftp">
+
<div class="col-5">
<a href="http://www.ramtrucks.com/">
<img src="{@docRoot}auto/images/logos/auto/ram.png"
@@ -569,27 +582,37 @@
width="120" height="120" class="img-logo" />
</a>
</div>
+ </div>
+ <div class="cols cols-leftp">
+ <div class="col-5">
+ <a href="http://www.renaultsamsungm.com/ ">
+ <img src="{@docRoot}auto/images/logos/auto/rsm.png"
+ width="120" height="120" class="img-logo" />
+ </a>
+ </div>
+
<div class="col-5">
<a href="http://www.seat.com/">
<img src="{@docRoot}auto/images/logos/auto/seat.png"
width="120" height="120" class="img-logo" />
</a>
</div>
+
<div class="col-5">
<a href="http://www.skoda-auto.com/">
<img src="{@docRoot}auto/images/logos/auto/skoda.png"
width="120" height="120" class="img-logo" />
</a>
</div>
- </div>
- <div class="cols cols-leftp">
+
<div class="col-5">
<a href="http://www.smotor.com/">
<img src="{@docRoot}auto/images/logos/auto/ssangyong.png"
width="120" height="120" class="img-logo" />
</a>
</div>
-
+ </div>
+ <div class="cols cols-leftp">
<div class="col-5">
<a href="http://www.subaru-global.com/">
<img src="{@docRoot}auto/images/logos/auto/subaru.png"
@@ -597,13 +620,20 @@
</a>
</div>
-
<div class="col-5">
<a href="http://www.globalsuzuki.com/automobile/">
<img src="{@docRoot}auto/images/logos/auto/suzuki.png"
width="120" height="120" class="img-logo" />
</a>
</div>
+
+ <div class="col-5">
+ <a href="http://www.tatamotors.com/">
+ <img src="{@docRoot}auto/images/logos/auto/tata.png"
+ width="120" height="120" class="img-logo" />
+ </a>
+ </div>
+
<div class="col-5">
<a href="http://www.vauxhall.co.uk/">
<img src="{@docRoot}auto/images/logos/auto/vauxhall.png"
@@ -618,7 +648,8 @@
width="120" height="120" class="img-logo" />
</a>
</div>
-
+
+
<div class="col-5">
<a href="http://www.volvocars.com/intl">
<img src="{@docRoot}auto/images/logos/auto/volvo.png"
diff --git a/docs/html/guide/topics/resources/layout-resource.jd b/docs/html/guide/topics/resources/layout-resource.jd
index 366ddc8..cff2038 100644
--- a/docs/html/guide/topics/resources/layout-resource.jd
+++ b/docs/html/guide/topics/resources/layout-resource.jd
@@ -33,16 +33,17 @@
<dt>syntax:</dt>
<dd>
<pre class="stx">
-<?xml version="1.0" encoding="utf-8"?>
-<<a href="#viewgroup-element"><em>ViewGroup</em></a> xmlns:android="http://schemas.android.com/apk/res/android"
+<?xml version="1.0" encoding="utf-8"?>
+<<a href="#viewgroup-element"><em>ViewGroup</em></a>
+ xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@[+][<em>package</em>:]id/<em>resource_name</em>"
- android:layout_height=["<em>dimension</em>" | "fill_parent" | "wrap_content"]
- android:layout_width=["<em>dimension</em>" | "fill_parent" | "wrap_content"]
+ android:layout_height=["<em>dimension</em>" | "match_parent" | "wrap_content"]
+ android:layout_width=["<em>dimension</em>" | "match_parent" | "wrap_content"]
[<em>ViewGroup-specific attributes</em>] >
<<a href="#view-element"><em>View</em></a>
android:id="@[+][<em>package</em>:]id/<em>resource_name</em>"
- android:layout_height=["<em>dimension</em>" | "fill_parent" | "wrap_content"]
- android:layout_width=["<em>dimension</em>" | "fill_parent" | "wrap_content"]
+ android:layout_height=["<em>dimension</em>" | "match_parent" | "wrap_content"]
+ android:layout_width=["<em>dimension</em>" | "match_parent" | "wrap_content"]
[<em>View-specific attributes</em>] >
<<a href="#requestfocus-element">requestFocus</a>/>
</<em>View</em>>
@@ -82,15 +83,17 @@
</dd>
<dt><code>android:layout_height</code></dt>
<dd><em>Dimension or keyword</em>. <strong>Required</strong>. The height for the group, as a
-dimension value (or <a
-href="more-resources.html#Dimension">dimension resource</a>) or a keyword ({@code "fill_parent"}
-or {@code "wrap_content"}). See the <a href="#layoutvalues">valid values</a> below.
+dimension value (or
+<a href="more-resources.html#Dimension">dimension resource</a>) or a keyword
+({@code "match_parent"} or {@code "wrap_content"}). See the <a href=
+"#layoutvalues">valid values</a> below.
</dd>
<dt><code>android:layout_width</code></dt>
<dd><em>Dimension or keyword</em>. <strong>Required</strong>. The width for the group, as a
-dimension value (or <a
-href="more-resources.html#Dimension">dimension resource</a>) or a keyword ({@code "fill_parent"}
-or {@code "wrap_content"}). See the <a href="#layoutvalues">valid values</a> below.
+dimension value (or
+<a href="more-resources.html#Dimension">dimension resource</a>) or a keyword
+({@code "match_parent"} or {@code "wrap_content"}). See the <a href=
+"#layoutvalues">valid values</a> below.
</dd>
</dl>
<p>More attributes are supported by the {@link android.view.ViewGroup}
@@ -114,15 +117,17 @@
</dd>
<dt><code>android:layout_height</code></dt>
<dd><em>Dimension or keyword</em>. <strong>Required</strong>. The height for the element, as
-a dimension value (or <a
-href="more-resources.html#Dimension">dimension resource</a>) or a keyword ({@code "fill_parent"}
-or {@code "wrap_content"}). See the <a href="#layoutvalues">valid values</a> below.
+a dimension value (or
+<a href="more-resources.html#Dimension">dimension resource</a>) or a keyword
+({@code "match_parent"} or {@code "wrap_content"}). See the <a href=
+"#layoutvalues">valid values</a> below.
</dd>
<dt><code>android:layout_width</code></dt>
<dd><em>Dimension or keyword</em>. <strong>Required</strong>. The width for the element, as
-a dimension value (or <a
-href="more-resources.html#Dimension">dimension resource</a>) or a keyword ({@code "fill_parent"}
-or {@code "wrap_content"}). See the <a href="#layoutvalues">valid values</a> below.
+a dimension value (or
+<a href="more-resources.html#Dimension">dimension resource</a>) or a keyword
+({@code "match_parent"} or {@code "wrap_content"}). See the <a href=
+"#layoutvalues">valid values</a> below.
</dd>
</dl>
<p>More attributes are supported by the {@link android.view.View}
@@ -221,9 +226,6 @@
deprecate <code>fill_parent</code>.</td>
</tr>
<tr>
- <td><code>fill_parent</code></td>
- <td>Sets the dimension to match that of the parent element.</td>
- </tr><tr>
<td><code>wrap_content</code></td>
<td>Sets the dimension only to the size required to fit the content of this element.</td>
</tr>
@@ -245,8 +247,8 @@
<pre>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:orientation="vertical" >
<TextView android:id="@+id/text"
android:layout_width="wrap_content"
@@ -279,4 +281,4 @@
</ul>
</dd>
-</dl>
+</dl>
\ No newline at end of file
diff --git a/docs/html/images/training/tv/tif/app-link-2x.png b/docs/html/images/training/tv/tif/app-link-2x.png
new file mode 100644
index 0000000..d9d0582
--- /dev/null
+++ b/docs/html/images/training/tv/tif/app-link-2x.png
Binary files differ
diff --git a/docs/html/images/training/tv/tif/app-link-diagram.png b/docs/html/images/training/tv/tif/app-link-diagram.png
new file mode 100644
index 0000000..92328ad
--- /dev/null
+++ b/docs/html/images/training/tv/tif/app-link-diagram.png
Binary files differ
diff --git a/docs/html/images/training/tv/tif/app-link.png b/docs/html/images/training/tv/tif/app-link.png
new file mode 100644
index 0000000..7573a18
--- /dev/null
+++ b/docs/html/images/training/tv/tif/app-link.png
Binary files differ
diff --git a/docs/html/topic/libraries/support-library/features.jd b/docs/html/topic/libraries/support-library/features.jd
index 584bef8..d648384 100755
--- a/docs/html/topic/libraries/support-library/features.jd
+++ b/docs/html/topic/libraries/support-library/features.jd
@@ -142,7 +142,7 @@
</p>
<p>After you download the Android Support Libraries, this library is located in the
-{@code <sdk>/extras/android/support/v4/} directory. The library does not contain user
+<code><sdk>/extras/android/support/v4/</code> directory. The library does not contain user
interface resources. To include it in your application project, follow the instructions for
<a href="{@docRoot}tools/support-library/setup.html#libs-without-res">Adding libraries without
resources</a>.</p>
@@ -169,7 +169,7 @@
<p>
After you download the Android Support Libraries, this library is located in the
- {@code <sdk>/extras/android/support/multidex/} directory. The library does not contain
+ <code><sdk>/extras/android/support/multidex/</code> directory. The library does not contain
user interface resources. To include it in your application project, follow the instructions
for
<a href= "{@docRoot}tools/support-library/setup.html#libs-without-res">Adding libraries without
@@ -229,7 +229,7 @@
</ul>
<p>After you download the Android Support Libraries, this library is located in the
-{@code <sdk>/extras/android/support/v7/appcompat/} directory. The library contains user
+<code><sdk>/extras/android/support/v7/appcompat/</code> directory. The library contains user
interface resources. To include it in your application project, follow the instructions for
<a href="{@docRoot}tools/support-library/setup.html#libs-with-res">Adding libraries with
resources</a>.</p>
@@ -250,7 +250,7 @@
implementations, and are used extensively in layouts for TV apps.</p>
<p>After you download the Android Support Libraries, this library is located in the
-{@code <sdk>/extras/android/support/v7/cardview/} directory. The library contains user interface
+<code><sdk>/extras/android/support/v7/cardview/</code> directory. The library contains user interface
resources. To include it in your application project, follow the instructions
for <a href="{@docRoot}tools/support-library/setup.html#libs-with-res">Adding
libraries with resources</a>.</p>
@@ -271,7 +271,7 @@
For detailed information about the v7 gridlayout library APIs, see the
{@link android.support.v7.widget android.support.v7.widget} package in the API reference.</p>
-<p>This library is located in the {@code <sdk>/extras/android/support/v7/gridlayout/}
+<p>This library is located in the <code><sdk>/extras/android/support/v7/gridlayout/</code>
directory . The library contains user
interface resources. To include it in your application project, follow the instructions for
<a href="{@docRoot}tools/support-library/setup.html#libs-with-res">Adding libraries with
@@ -332,7 +332,7 @@
title card.</p>
<p>After you download the Android Support Libraries, this library is located in the
-{@code <sdk>/extras/android/support/v7/palette/} directory. The library does not contain
+<code><sdk>/extras/android/support/v7/palette/</code> directory. The library does not contain
user interface resources. To include it in your application project, follow the instructions for
<a href="{@docRoot}tools/support-library/setup.html#libs-without-res">Adding libraries without
resources</a>.</p>
@@ -354,7 +354,7 @@
limited window of data items.</p>
<p>After you download the Android Support Libraries, this library is located in the
-{@code <sdk>/extras/android/support/v7/recyclerview/} directory. The library contains
+<code><sdk>/extras/android/support/v7/recyclerview/</code> directory. The library contains
user interface resources. To include it in your application project, follow the instructions
for <a href="{@docRoot}tools/support-library/setup.html#libs-with-res">Adding
libraries with resources</a>.</p>
@@ -383,7 +383,7 @@
<p>After you download the Android Support Libraries, this library is located in the
-{@code <sdk>/extras/android/support/v7/preference} directory. For more information
+<code><sdk>/extras/android/support/v7/preference</code> directory. For more information
on how to set up your project, follow the instructions in <a
href="{@docRoot}tools/support-library/setup.html#libs-with-res">Adding libraries
with resources</a>. </p>
@@ -447,7 +447,7 @@
</p>
<p>After you download the Android Support Libraries, this library is located in the
-{@code <sdk>/extras/android/support/v13/} directory. The library does not contain user
+<code><sdk>/extras/android/support/v13/</code> directory. The library does not contain user
interface resources. To include it in your application project, follow the instructions for
<a href="{@docRoot}tools/support-library/setup.html#libs-without-res">Adding libraries without
resources</a>.</p>
@@ -479,7 +479,7 @@
</p>
<p>After you download the Android Support Libraries, this library is located in the
-{@code <sdk>/extras/android/support/v14/} directory. The library does not contain user
+<code><sdk>/extras/android/support/v14/</code> directory. The library does not contain user
interface resources. To include it in your application project, follow the instructions for
<a href="{@docRoot}tools/support-library/setup.html#libs-without-res">Adding libraries without
resources</a>.</p>
@@ -508,7 +508,7 @@
</p>
<p>After you download the Android Support Libraries, this library is located in the
-{@code <sdk>/extras/android/support/v17/} directory. The library does not contain user
+<code><sdk>/extras/android/support/v17/</code> directory. The library does not contain user
interface resources. To include it in your application project, follow the instructions for
<a href="{@docRoot}tools/support-library/setup.html#libs-without-res">Adding libraries without
resources</a>.</p>
@@ -550,7 +550,7 @@
</ul>
<p>After you download the Android Support Libraries, this library is located in the
-{@code <sdk>/extras/android/support/v17/leanback} directory. For more information
+<code><sdk>/extras/android/support/v17/leanback</code> directory. For more information
on how to set up your project, follow the instructions in <a
href="{@docRoot}tools/support-library/setup.html#libs-with-res">Adding libraries
with resources</a>. </p>
@@ -571,7 +571,7 @@
<p></p>
<p>After you download the Android Support Libraries, this library is located in the
-{@code <sdk>/extras/android/support/annotations} directory. For more information
+<code><sdk>/extras/android/support/annotations</code> directory. For more information
on how to set up your project, follow the instructions in <a
href="{@docRoot}tools/support-library/setup.html#libs-with-res">Adding libraries
with resources</a>. </p>
@@ -596,7 +596,7 @@
<p>After you download the Android Support Libraries, this library is located in the
-{@code <sdk>/extras/android/support/design} directory. For more information
+<code><sdk>/extras/android/support/design</code> directory. For more information
on how to set up your project, follow the instructions in <a
href="{@docRoot}tools/support-library/setup.html#libs-with-res">Adding libraries
with resources</a>. </p>
@@ -624,7 +624,7 @@
<p>After you download the Android Support Libraries, this library is located in the
-{@code <sdk>/extras/android/support/customtabs} directory. For more information
+<code><sdk>/extras/android/support/customtabs</code> directory. For more information
on how to set up your project, follow the instructions in <a
href="{@docRoot}tools/support-library/setup.html#libs-with-res">Adding libraries
with resources</a>. </p>
@@ -655,7 +655,7 @@
<p>After you download the Android Support Libraries, this library is located in the
-{@code <sdk>/extras/android/support/percent} directory. For more information
+<code><sdk>/extras/android/support/percent</code> directory. For more information
on how to set up your project, follow the instructions in <a
href="{@docRoot}tools/support-library/setup.html#libs-with-res">Adding libraries
with resources</a>. </p>
@@ -685,7 +685,7 @@
<p>After you download the Android Support Libraries, this library is located in the
-{@code <sdk>/extras/android/support/recommendation} directory. For more information
+<code><sdk>/extras/android/support/recommendation</code> directory. For more information
on how to set up your project, follow the instructions in <a
href="{@docRoot}tools/support-library/setup.html#libs-with-res">Adding libraries
with resources</a>. </p>
diff --git a/docs/html/training/basics/firstapp/creating-project.jd b/docs/html/training/basics/firstapp/creating-project.jd
index e66237a..4c2155b 100644
--- a/docs/html/training/basics/firstapp/creating-project.jd
+++ b/docs/html/training/basics/firstapp/creating-project.jd
@@ -93,13 +93,19 @@
Activities</a> for more information.</p>
</div>
</div>
- <li>Under <strong>Add an activity to <<em>template</em>></strong>, select <strong>Blank
- Activity</strong> and click <strong>Next</strong>.</li>
+ <li>Under <strong>Add an activity to <<em>template</em>></strong>,
+ select <strong>Basic Activity</strong> and click <strong>Next</strong>.
+ </li>
+
<li>Under <strong>Customize the Activity</strong>, change the
- <strong>Activity Name</strong> to <em>MyActivity</em>. The <strong>Layout Name</strong> changes
- to <em>activity_my</em>, and the <strong>Title</strong> to <em>MyActivity</em>. The
- <strong>Menu Resource Name</strong> is <em>menu_my</em>.
- <li>Click the <strong>Finish</strong> button to create the project.</li>
+ <strong>Activity Name</strong> to <em>MyActivity</em>. The <strong>Layout
+ Name</strong> changes to <em>activity_my</em>, and the <strong>Title</strong>
+ to <em>MyActivity</em>. The <strong>Menu Resource Name</strong> is
+ <em>menu_my</em>.
+ </li>
+
+ <li>Click the <strong>Finish</strong> button to create the project.
+ </li>
</ol>
<p>Your Android project is now a basic "Hello World" app that contains some default files. Take a
@@ -180,4 +186,6 @@
string and color definitions.</dd>
</dl>
-<p>To run the app, continue to the <a href="running-app.html">next lesson</a>.</p>
+<p>
+ To run the app, continue to the <a href="running-app.html">next lesson</a>.
+</p>
\ No newline at end of file
diff --git a/docs/html/training/tv/tif/channel.jd b/docs/html/training/tv/tif/channel.jd
index 999f1ca..59e357a 100644
--- a/docs/html/training/tv/tif/channel.jd
+++ b/docs/html/training/tv/tif/channel.jd
@@ -13,6 +13,7 @@
<li><a href="#permission">Get Permission</a></li>
<li><a href="#register">Register Channels in the Database</a></li>
<li><a href="#update">Update Channel Data</a></li>
+ <li><a href="#applink">Add App Link Information</a></li>
</ol>
<h2>Try It Out</h2>
<ul>
@@ -22,10 +23,13 @@
</div>
</div>
-<p>Your TV input must provide Electronic Program Guide (EPG) data for at least one channel in its
-setup activity. You should also periodically update that data, with consideration for the size of
-the update and the processing thread that handles it. This lesson discusses creating and updating
-channel and program data on the system database with these considerations in mind.</p>
+<p>Your TV input must provide Electronic Program Guide (EPG) data for at least
+one channel in its setup activity. You should also periodically update that
+data, with consideration for the size of the update and the processing thread
+that handles it. Additionally, you can provide app links for channels
+that guide the user to related content and activities.
+This lesson discusses creating and updating channel and program data on the
+system database with these considerations in mind.</p>
<p> </p>
@@ -70,6 +74,10 @@
ID</li>
</ul>
+<p>If you want to provide app link details for your channels, you need to
+update some additional fields. For more information on app link fields, see
+<a href="#applink">Add App Link Information</a>.
+
<p>For internet streaming based TV inputs, assign your own values to the above accordingly so that
each channel can be identified uniquely.</p>
@@ -236,4 +244,112 @@
<p>Other techniques to separate the data update tasks from the UI thread include using the
{@link android.os.HandlerThread} class, or you may implement your own using {@link android.os.Looper}
and {@link android.os.Handler} classes. See <a href="{@docRoot}guide/components/processes-and-threads.html">
-Processes and Threads</a> for more information.</p>
\ No newline at end of file
+Processes and Threads</a> for more information.</p>
+
+<h2 id="applink">Add App Link Information</h2>
+
+<p>Channels can use <em>app links</em> to let users easily launch a related
+activity while they are watching channel content. Channel apps use
+app links to extend user engagement by launching activities that show
+related information or additional content. For example, you can use app links
+to do the following:</p>
+
+<ul>
+<li>Guide the user to discover and purchase related content.</li>
+<li>Provide additional information about currently playing content.</li>
+<li>While viewing episodic content, start viewing the next episode in a
+series.</li>
+<li>Let the user interact with content—for example, rate or review
+content—without interrupting content playback.</li>
+</ul>
+
+<p>App links are displayed when the user presses <b>Select</b> to show the
+TV menu while watching channel content.</p>
+
+<img alt="" src="{@docRoot}images/training/tv/tif/app-link.png"
+srcset="{@docRoot}images/training/tv/tif/app-link.png 1x,
+{@docRoot}images/training/tv/tif/app-link-2x.png 2x" id="figure1"/>
+<p class="img-caption"><strong>Figure 1.</strong> An example app link
+displayed on the <b>Channels</b> row while channel content is shown.</p>
+
+<p>When the user selects the app link, the system starts an activity using
+an intent URI specified by the channel app. Channel content continues to play
+while the app link activity is active. The user can return to the channel
+content by pressing <b>Back</b>.</p>
+
+<h3 id="card">Provide App Link Channel Data</h4>
+
+<p>Android TV automatically creates an app link for each channel,
+using information from the channel data. To provide app link information,
+specify the following details in your
+{@link android.media.tv.TvContract.Channels} fields:
+</p>
+
+<ul>
+<li>{@link android.media.tv.TvContract.Channels#COLUMN_APP_LINK_COLOR} - The
+accent color of the app link for this channel. For an example accent color,
+see figure 2, callout 3.
+</li>
+<li>{@link android.media.tv.TvContract.Channels#COLUMN_APP_LINK_ICON_URI} -
+The URI for the app badge icon of the app link for this channel. For an
+example app badge icon, see figure 2, callout 2.
+</li>
+<li>{@link android.media.tv.TvContract.Channels#COLUMN_APP_LINK_INTENT_URI} -
+The intent URI of the app link for this channel. You can create the URI
+using {@link android.content.Intent#toUri(int) toUri(int)} with
+{@link android.content.Intent#URI_INTENT_SCHEME URI_INTENT_SCHEME} and
+convert the URI back to the original intent with
+{@link android.content.Intent#parseUri parseUri()}.
+</li>
+<li>{@link android.media.tv.TvContract.Channels#COLUMN_APP_LINK_POSTER_ART_URI}
+- The URI for the poster art used as the background of the app link
+for this channel. For an example poster image, see figure 2, callout 1.</li>
+<li>{@link android.media.tv.TvContract.Channels#COLUMN_APP_LINK_TEXT} -
+The descriptive link text of the app link for this channel. For an example
+app link description, see the text in figure 2, callout 3.</li>
+</ul>
+
+<img alt="" src="{@docRoot}images/training/tv/tif/app-link-diagram.png"/>
+<p class="img-caption"><strong>Figure 2.</strong> App link details.</p>
+
+<p>If the channel data doesn't specify app link information, the system
+creates a default app link. The system chooses default details as follows:</p>
+
+<ul>
+<li>For the intent URI
+({@link android.media.tv.TvContract.Channels#COLUMN_APP_LINK_INTENT_URI}),
+the system uses the {@link android.content.Intent#ACTION_MAIN ACTION_MAIN}
+activity for the {@link android.content.Intent#CATEGORY_LEANBACK_LAUNCHER
+CATEGORY_LEANBACK_LAUNCHER} category, typically defined in the app manifest.
+If this activity is not defined, a non-functioning app link appears—if
+the user clicks it, nothing happens.</li>
+<li>For the descriptive text
+({@link android.media.tv.TvContract.Channels#COLUMN_APP_LINK_TEXT}), the system
+uses "Open <var>app-name</var>". If no viable app link intent URI is defined,
+the system uses "No link available".</li>
+<li>For the accent color
+({@link android.media.tv.TvContract.Channels#COLUMN_APP_LINK_COLOR}),
+the system uses the default app color.</li>
+<li>For the poster image
+({@link android.media.tv.TvContract.Channels#COLUMN_APP_LINK_POSTER_ART_URI}),
+the system uses the app's home screen banner. If the app doesn't provide a
+banner, the system uses a default TV app image.</li>
+<li>For the badge icon
+({@link android.media.tv.TvContract.Channels#COLUMN_APP_LINK_ICON_URI}), the
+system uses a badge that shows the app name. If the system is also using the
+app banner or default app image for the poster image, no app badge is shown.
+</li>
+</ul>
+
+<p>You specify app link details for your channels in your app's
+setup activity. You can update these app link details at any point, so
+if an app link needs to match channel changes, update app
+link details and call
+{@link android.content.ContentResolver#update(android.net.Uri,
+android.content.ContentValues, java.lang.String, java.lang.String[])
+ContentResolver.update()} as needed. For more details on updating
+channel data, see <a href="#update">Update Channel Data</a>.
+</p>
+
+
+
diff --git a/docs/html/wear/preview/_book.yaml b/docs/html/wear/preview/_book.yaml
index a4acad0..3bea2fd 100644
--- a/docs/html/wear/preview/_book.yaml
+++ b/docs/html/wear/preview/_book.yaml
@@ -18,6 +18,8 @@
path: /wear/preview/features/ui-nav-actions.html
- title: Bridging for Notifications
path: /wear/preview/features/bridger.html
+ - title: Wrist Gestures
+ path: /wear/preview/features/gestures.html
- title: Get Started
path: /wear/preview/start.html
diff --git a/docs/html/wear/preview/api-overview.jd b/docs/html/wear/preview/api-overview.jd
index 11331a7..4233624 100644
--- a/docs/html/wear/preview/api-overview.jd
+++ b/docs/html/wear/preview/api-overview.jd
@@ -25,6 +25,7 @@
<li><a href="#remote-input">Remote Input</a></li>
<li><a href="#bridging">Bridging Mode</a></li>
<li><a href="#imf">Input Method Framework</a></li>
+ <li><a href="#wrist-gestures">Wrist Gestures</a></li>
</ol>
</li>
@@ -79,12 +80,11 @@
watch face using the API.
</p>
-<p>For examples of how to use this feature,
+<p>For information about this API,
see <a href="{@docRoot}wear/preview/features/complications.html">
Watch Face Complications</a>.
</p>
-
<h3 id="drawers">Navigation and Action drawers</h3>
<p>Wear 2.0 introduces two new widgets, navigation drawer and action drawer. These
@@ -233,6 +233,24 @@
Input Method Framework</a>.
</p>
+<h3 id="wrist-gestures">Wrist Gestures</h3>
+
+<p>
+ Wrist gestures can enable quick, one-handed interactions with your app
+ when use of a touch screen is inconvenient. The following
+ <a href="https://support.google.com/androidwear/answer/6312406">wrist gestures</a>
+ are available for use by apps:
+</p>
+
+<ul>
+ <li>Flick wrist out</li>
+ <li>Flick wrist in</li>
+</ul>
+
+<p>For more information, see
+<a href="{@docRoot}wear/preview/features/gestures.html">
+ Wrist Gestures</a>.
+</p>
<h2 id="stand-alone">Standalone Devices</h2>
diff --git a/docs/html/wear/preview/downloads.jd b/docs/html/wear/preview/downloads.jd
index 8689504..4bc401b 100644
--- a/docs/html/wear/preview/downloads.jd
+++ b/docs/html/wear/preview/downloads.jd
@@ -223,8 +223,8 @@
</p>
<p class="warning">
- <strong>Warning:</strong> Installing a system image on a watch removes all data from the
- watch, so you should back up your data first.
+ <strong>Warning:</strong> Installing a system image on a watch removes all
+ data from the watch, so you should back up your data first.
</p>
<h3 id="preview_system_images">
@@ -233,8 +233,13 @@
<p>
The preview includes system images for testing your app. Based on your
- device, you can download a preview system image from the following tables
- and flash it to the corresponding device.
+ device, you can download a preview system image from one of the
+ following tables and flash it to the corresponding device.
+ </p>
+
+ <p>
+ To restore your device to its original state during the preview,
+ you can flash the appropriate retail system image, below, to the device.
</p>
<h4 id="preview_image_for_lge_watch_urbane_2nd_edition">
@@ -261,9 +266,9 @@
<td>
Preview image for testing
</td>
- <td><a href="#top" onclick="onDownload(this)">nemo-nvd36i-factory-9cdd2ac0.tgz</a><br>
- MD5: b33ba8e59780fbe5c83d8936b108640f<br>
- SHA-1: 9cdd2ac01f2976cafe5a21958298dac159b7a325
+ <td><a href="#top" onclick="onDownload(this)">nemo-nvd83h-factory-48ac950c.tgz</a><br>
+ MD5: dd351884cce9fb5bf1bdec0a8e5f56e3<br>
+ SHA-1: 48ac950c48faef96a7770e3c1acb56d23a28d859
</td>
</tr>
@@ -302,9 +307,9 @@
<td>
Preview image for testing
</td>
- <td><a href="#top" onclick="onDownload(this)">sturgeon-nvd36i-factory-2cbe5080.tgz</a><br>
- MD5: ccc972cdc33cba778a2f624066ef5713<br>
- SHA-1: 2cbe5080ded060ce43ba65ff27e2290b28981634
+ <td><a href="#top" onclick="onDownload(this)">sturgeon-nvd83h-factory-cb5a11ab.tgz</a><br>
+ MD5: 38c1047992b1d28f6833d9f6c8470cdc<br>
+ SHA-1: cb5a11ab0260ea3ca7da5894e73e41f70357da6b
</td>
</tr>
<tr id="sturgeon-non-preview">
diff --git a/docs/html/wear/preview/features/gestures.jd b/docs/html/wear/preview/features/gestures.jd
new file mode 100644
index 0000000..7806c4e
--- /dev/null
+++ b/docs/html/wear/preview/features/gestures.jd
@@ -0,0 +1,323 @@
+page.title=Wrist Gestures
+meta.keywords="wear-preview"
+page.tags="wear-preview"
+page.image=images/cards/card-n-sdk_2x.png
+
+@jd:body
+
+<div id="qv-wrapper">
+<div id="qv">
+
+<h2>In this document</h2>
+
+ <ul>
+ <li><a href="#using_wlv">Using a WearableListView</a></li>
+ <li><a href="#using_key_events">Using Key Events Directly</a></li>
+ <li><a href="#best_practices">Best Practices</a></li>
+ </ul>
+
+</div>
+</div>
+
+ <p>
+ Wrist gestures can enable quick, one-handed interactions with your app
+ when use of a touch screen is inconvenient. For example, a user can scroll
+ through notifications with one hand while holding a cup of water with the
+ other. Other examples of using wrist gestures when a touch screen would
+ be inconvenient include:
+ </p>
+
+ <ul>
+ <li>In an app for jogging, navigating through vertical screens that show
+ the steps taken, time elapsed, and current pace
+ </li>
+
+ <li>At the airport with luggage, scrolling through flight and gate
+ information
+ </li>
+
+ <li>Scrolling through news articles
+ </li>
+ </ul>
+
+ <p>
+ To review the wrist gestures on your watch, first confirm gestures are
+ turned on by selecting <strong>Settings > Gestures > Wrist Gestures
+ On</strong>. (Wrist gestures are on by default.) Then complete the
+ Gestures tutorial on the watch (<strong>Settings > Gestures >
+ Launch Tutorial</strong>).
+ </p>
+
+ <p>
+ The following gestures from the <a href=
+ "https://support.google.com/androidwear/answer/6312406">Android Wear
+ Help</a> are unavailable to apps:
+ </p>
+
+ <ul>
+ <li>Push wrist down
+ </li>
+
+ <li>Raise wrist up
+ </li>
+
+ <li>Shaking the wrist
+ </li>
+ </ul>
+
+ <p>
+ Wrist gestures can be used in these ways:
+ </p>
+
+ <ul>
+ <li>
+ <a href="#using_wlv">Using a WearableListView</a>, which
+ has predefined gesture actions
+ </li>
+
+ <li>
+ <a href="#using_key_events">Using key events directly</a> to
+ define new user actions
+ </li>
+ </ul>
+
+ <p>
+ Each wrist gesture is mapped to an <code>int</code> constant from the
+ <code><a href=
+ "{@docRoot}reference/android/view/KeyEvent.html">KeyEvent</a></code>
+ class, as shown in the following table:
+ </p>
+
+ <table>
+ <tr>
+ <th>
+ Gesture
+ </th>
+ <th>
+ KeyEvent
+ </th>
+ <th>
+ Description
+ </th>
+ </tr>
+
+ <tr>
+ <td>
+ Flick wrist out
+ </td>
+ <td>
+ <a href=
+ "{@docRoot}reference/android/view/KeyEvent.html#KEYCODE_NAVIGATE_NEXT">
+ KEYCODE_NAVIGATE_NEXT</a>
+ </td>
+ <td>
+ This key code goes to the next item.
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ Flick wrist in
+ </td>
+ <td>
+ <a href=
+ "{@docRoot}reference/android/view/KeyEvent.html#KEYCODE_NAVIGATE_PREVIOUS">
+ KEYCODE_NAVIGATE_PREVIOUS</a>
+ </td>
+ <td>
+ This key code goes to the previous item.
+ </td>
+ </tr>
+ </table>
+
+ <h2 id="using_wlv">
+ Using a WearableListView
+ </h2>
+
+ <p>
+ A <code><a href=
+ "{@docRoot}reference/android/support/wearable/view/WearableListView.html">
+ WearableListView</a></code> has predefined actions for occurrences of
+ wrist gestures when the View has the focus. For more information, see
+ <a href="#best_practices">Best Practices</a>. For information about using
+ <code>WearableListView</code>, see <a href=
+ "{@docRoot}training/wearables/ui/lists.html">Creating
+ Lists</a>.
+ </p>
+
+ <p>
+ Even if you use a <code>WearableListView</code>, you may want to use
+ constants from the <code><a href=
+ "{@docRoot}reference/android/view/KeyEvent.html">KeyEvent</a></code>
+ class. The predefined actions can be overridden by subclassing the
+ <code>WearableListView</code> and re-implementing the
+ <code>onKeyDown()</code> callback. The behavior can be disabled entirely
+ by using <code>setEnableGestureNavigation(false)</code>. Also see
+ <a href="{@docRoot}training/keyboard-input/commands.html">
+ Handling Keyboard Actions</a>.
+ </p>
+
+ <h2 id="using_key_events">
+ Using Key Events Directly
+ </h2>
+
+ <p>
+ You can use key events outside of a <code><a href=
+ "{@docRoot}reference/android/support/wearable/view/WearableListView.html">
+ WearableListView</a></code> to trigger new actions in response to gesture
+ events. Importantly, these gesture events:
+ </p>
+
+ <ul>
+ <li>Are recognized when a device is in Active mode
+ </li>
+
+ <li>Are delivered in the same way as all key events
+ </li>
+ </ul>
+
+ <p>
+ Specifically, these events are delivered to the top Activity, to the View
+ with keyboard focus. Just as any other key event, a class that relates to
+ user interaction (such as a View or an Activity) that implements
+ <code><a href=
+ "{@docRoot}reference/android/view/KeyEvent.Callback.html">
+ KeyEvent.Callback</a></code> can listen to key events that relate to
+ wrist gestures. The Android framework calls the View or Activity that has
+ the focus with the key events; for gestures, the <code>onKeyDown()</code>
+ method callback is called when gestures occur.
+ </p>
+
+ <p>
+ As an example, an app may override predefined actions in a View or
+ Activity (both implementing <code>KeyEvent.Callback</code>) as follows:
+ </p>
+
+ <pre>
+public final class GesturesActivity extends Activity {
+
+ @Override /* KeyEvent.Callback */
+ public boolean onKeyDown(int keyCode, KeyEvent event) {
+ switch (keyCode) {
+ case KeyEvent.KEYCODE_NAVIGATE_NEXT:
+ // Do something that advances a user View to the next item in an ordered list.
+ return moveToNextItem();
+ case KeyEvent.KEYCODE_NAVIGATE_PREVIOUS:
+ // Do something that advances a user View to the previous item in an ordered list.
+ return moveToPreviousItem();
+ }
+ // If you did not handle it, let it be handled by the next possible element as deemed by the Activity.
+ return super.onKeyDown(keyCode, event);
+ }
+
+ /** Shows the next item in the custom list. */
+ private boolean moveToNextItem() {
+ boolean handled = false;
+ …
+ // Return true if handled successfully, otherwise return false.
+ return handled;
+ }
+
+ /** Shows the previous item in the custom list. */
+ private boolean moveToPreviousItem() {
+ boolean handled = false;
+ …
+ // Return true if handled successfully, otherwise return false.
+ return handled;
+ }
+}
+</pre>
+
+ <h2 id="best_practices">
+ Best Practices
+ </h2>
+
+ <ul>
+ <li>Review the <code><a href=
+ "{@docRoot}reference/android/view/KeyEvent.html">KeyEvent</a></code>
+ and <code><a href=
+ "{@docRoot}reference/android/view/KeyEvent.Callback.html">
+ KeyEvent.Callback</a></code> pages for the delivery of key events to
+ your View and Activity.
+ </li>
+
+ <li>Keep a consistent directional affordance:
+ <ul>
+ <li>Use "Flick wrist out" for next, "Flick wrist in" for previous
+ </li>
+ </ul>
+ </li>
+
+ <li>Have a touch parallel for a gesture.
+ </li>
+
+ <li>Provide visual feedback.
+ </li>
+
+ <li>Don't use a keycode to implement functionality that would be
+ counter-intuitive to the rest of the system. For example, do not use
+ <code>KEYCODE_NAVIGATE_NEXT</code> to cancel an action or to navigate the
+ left-right axis with flicks.
+ </li>
+
+ <li>Don't intercept the key events on elements that are not part of the
+ user interface, for example the Views that are offscreen or partially
+ covered. This is the same as any other key event.
+ </li>
+
+ <li>Don't reinterpret repeated flick gestures into your own, new gesture.
+ It may conflict with the system's "Shaking the wrist" gesture.
+ </li>
+
+ <li>For a View to receive gesture key events, it must have <a href=
+ "{@docRoot}reference/android/view/View.html#attr_android:focusable">
+ focus</a>; see <a href=
+ "{@docRoot}reference/android/view/View.html#setFocusable(boolean)">
+ View::setFocusable()</a>. Because gestures are treated as key events,
+ they trigger a transition out of "Touch mode" that may do unexpected
+ things. Therefore, since users may alternate between using touch and
+ gestures, the <a href=
+ "{@docRoot}reference/android/view/View.html#setFocusableInTouchMode(boolean)">
+ View::setFocusableInTouchmode()</a> method may be necessary. In some
+ cases, it also may be necessary to use
+ <code>setDescendantFocusability(FOCUS_BEFORE_DESCENDANTS)</code> so
+ that when focus changes after a change to or from "Touch mode," your
+ intended View gets the focus.
+ </li>
+
+ <li>Use <code>requestFocus()</code> and <code>clearFocus()</code>
+ carefully:
+ <ul>
+ <li>When calling <code><a href=
+ "{@docRoot}reference/android/view/View.html#requestFocus()">
+ requestFocus()</a></code>, be sure that the View really should have
+ focus. If the View is offscreen, or is covered by another View,
+ surprises can occur when gestures trigger callbacks.
+ </li>
+
+ <li>The <code><a href=
+ "{@docRoot}reference/android/view/View.html#clearFocus()">
+ clearFocus()</a></code> initiates a focus search to find another
+ suitable View. Depending on the View hierarchy, this search might
+ require non-trivial computation. It can also end up assigning focus
+ to a View you don’t expect to receive focus.
+ </li>
+ </ul>
+ </li>
+
+ <li>Key events are delivered first to the View with focus in the View
+ hierarchy. If the focused View does not handle the event (i.e., returns
+ <code>false</code>), the event is not delivered to the parent View, even
+ if it can receive focus and has a <a href=
+ "{@docRoot}reference/android/text/method/KeyListener.html">
+ KeyListener</a>. Rather, the event is delivered to the current Activity
+ holding the View hierarchy with focus. Thus, it may be necessary to
+ catch all events at the higher level and then pass relevant codes down.
+ Alternatively, you might subclass the Activity and override the
+ <code><a href=
+ "{@docRoot}reference/android/app/Activity.html#dispatchKeyEvent(android.view.KeyEvent)">
+ dispatchKeyEvent(KeyEvent event)</a></code> method to ensure that keys
+ are intercepted when necessary, or are handled when not handled at
+ lower layers.
+ </li>
+ </ul>
diff --git a/docs/html/wear/preview/features/ui-nav-actions.jd b/docs/html/wear/preview/features/ui-nav-actions.jd
index 1ba275f..fb14264 100644
--- a/docs/html/wear/preview/features/ui-nav-actions.jd
+++ b/docs/html/wear/preview/features/ui-nav-actions.jd
@@ -12,7 +12,7 @@
<ol>
<li><a href="#create a drawer">Create a Drawer Layout</a></li>
<li><a href="#initialize">Initialize the Drawer List</a></li>
- <li><a href="#creating">Create a Custom View Drawer</a></li>
+ <li><a href="#creating">Create a Custom Drawer View</a></li>
<li><a href="#listen to events">Listen for Drawer Events</a></li>
<li><a href=#peeking">Peeking Drawers</a></li>
</ol>
@@ -37,8 +37,8 @@
</div>
</div>
<p>As part of the <a href="http://www.google.com/design/spec-wear">Material Design</a>
- for Android Wear, Wear 2.0 adds interactive navigation and action drawers.
- The navigation drawer appears at the top of the screen and lets users jump to
+ for Android Wear, Wear 2.0 adds interactive navigation and action drawers.
+ The navigation drawer appears at the top of the screen and lets users jump to
different views within
the app, similar to the navigation drawer on a phone. The action drawer appears
at the bottom of the screen and provides context-specific actions for the user,
@@ -59,7 +59,8 @@
<div class="cols">
<p>This lesson describes how to implement action and navigation drawers in your
-app using the {@code WearableDrawerLayout} APIs.
+app using the {@code WearableDrawerLayout} APIs. For more information, see the
+downloadable <a href="{@docRoot}preview/setup-sdk.html#docs-dl">API reference</a>.
</p>
<h2 id="create a drawer">Create a Drawer Layout</h2>
@@ -99,41 +100,44 @@
</android.support.wearable.view.drawer.WearableDrawerLayout>
</pre>
+
<h2 id="initialize">Initialize the Drawer List</h2>
<p>One of the first things you need to do in your activity is to initialize the
drawers list of items. You should implement {@code WearableNavigationDrawerAdapter}
to populate the navigation drawer contents. To populate the action drawer with
-a list of actions, inflate an XML file into the Menu (via MenuInflater).</p>
+a list of actions, inflate an XML file into the Menu (via {@code MenuInflater}).
+</p>
<p>The following code snippet shows how to initialize the contents of your drawers:
</p>
+
<pre>
public class MainActivity extends WearableActivity implements
WearableActionDrawer.OnMenuItemClickListener{
private WearableDrawerLayout mwearableDrawerLayout;
private WearableNavigationDrawer mWearableNavigationDrawer;
private WearableActionDrawer mWearableActionDrawer;
-
+
...
-
+
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
-
+
......
-
-
+
+
// Main Wearable Drawer Layout that wraps all content
mWearableDrawerLayout = (WearableDrawerLayout) findViewById(R.id.drawer_layout);
-
+
// Top Navigation Drawer
mWearableNavigationDrawer = (WearableNavigationDrawer) findViewById(R.id.top_navigation_drawer);
mWearableNavigationDrawer.setAdapter(new YourImplementationNavigationAdapter(this));
// Peeks Navigation drawer on the top.
mWearableDrawerLayout.peekDrawer(Gravity.TOP);
-
+
// Bottom Action Drawer
mWearableActionDrawer = (WearableActionDrawer) findViewById(R.id.bottom_action_drawer);
@@ -149,44 +153,58 @@
}
</pre>
-<h2 id="creating">Create a Custom View Drawer</h2>
-<p>To use custom views in drawers, add <code>WearableDrawerView</code> to the
-<code>WearableDrawerLayout</code>. To set the contents of the drawer, call <code>
-<a href="https://x20web.corp.google.com/~psoulos/docs/reference/android/support/wearable/view/drawer/WearableDrawerView.html#setDrawerContent(android.view.View)">setDrawerContent(View)</a></code>
- instead of manually adding the view to the hierarchy. You must also specify the
- drawer position with the <code>android:layout_gravity</code> attribute. </p>
-<p> The following example specifies a top drawer:</p>
+<h2 id="creating">Create a Custom Drawer View</h2>
+
+<p>To use custom views in drawers, add <code>WearableDrawerView</code> to the
+<code>WearableDrawerLayout</code>. To set the peek view and drawer contents, add
+ them as children of the {@code WearableDrawerView} and specify their IDs in the
+ {@code peek_view} and {@code drawer_content} attributes respectively. You must
+ also specify the drawer position with the {@code android:layout_gravity}
+ attribute. </p>
+
+<p> The following example specifies a top drawer with peek view and drawer
+contents:</p>
+
<pre>
-<android.support.wearable.view.drawer.WearableDrawerLayout>
- <FrameLayout
- android:id=”@+id/content” />
-
- <WearableDrawerView
- android:layout_width=”match_parent”
- andndroid:layout_height=”match_parent”
- android:layout_gravity=”top”>
- <FrameLayout
- android:id=”@+id/top_drawer_content” />
- </WearableDrawerView>
-</android.support.wearable.view.drawer.WearableDrawerView>
+ <android.support.wearable.view.drawer.WearableDrawerView
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_gravity="top"
+ android:background="@color/red"
+ app:drawer_content="@+id/drawer_content"
+ app:peek_view="@+id/peek_view">
+ <FrameLayout
+ android:id="@id/drawer_content"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+ <!-- Drawer content goes here. -->
+ </FrameLayout>
+ <LinearLayout
+ android:id="@id/peek_view"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_horizontal"
+ android:orientation="horizontal">
+ <!-- Peek view content goes here. -->
+ <LinearLayout>
+ </android.support.wearable.view.drawer.WearableDrawerView>
</pre>
<h2 id="listen to events">Listen for Drawer Events</h2>
-<p>To listen for drawer events, call {@code setDrawerStateCallback()}on your
+<p>To listen for drawer events, call {@code setDrawerStateCallback()} on your
{@code WearableDrawerLayout} and pass it an implementation of
{@code WearableDrawerLayout.DrawerStateCallback}. This interface provides callbacks
for drawer events such as <code>onDrawerOpened()</code>,
<code>onDrawerClosed(),</code> and <code>onDrawerStatechanged()</code>.</p>
<h2 id="peeking">Peeking Drawers</h2>
-<p>To set the drawers to temporarily appear, call <code>peekDrawer()</code> on
+<p>To set the drawers to temporarily appear, call <code>peekDrawer()</code> on
your {@code WearableDrawerLayout} and pass it the {@code Gravity} of the drawer.
This feature is especially useful because it allows immediate access to the
- alternate drawer views or actions associated with it. </p>
+ alternate drawer views or actions associated with it: </p>
-<pre>{@code mWearableDrawerLayout.peekDrawer</code>(<code>Gravity.BOTTOM);}</pre>
+<pre>{@code mWearableDrawerLayout.peekDrawer(Gravity.BOTTOM);}</pre>
-<p>You can also call {@code setPeekContent()} on your drawer to display a custom
- view when the drawer is peeking.</p>
+
diff --git a/docs/html/wear/preview/program.jd b/docs/html/wear/preview/program.jd
index a130663..e2bf92f 100644
--- a/docs/html/wear/preview/program.jd
+++ b/docs/html/wear/preview/program.jd
@@ -79,6 +79,11 @@
</div>
<div class="col-4of12">
+ <h5>
+ </h5>
+
+ <p>
+ </p>
</div>
</div>
</div>
@@ -90,7 +95,7 @@
<p>
The Android Wear 2.0 Developer Preview runs from 18 May 2016 until the
- final Android Wear public release to OEMs, planned for Q4 2016.
+ final Android Wear public release to OEMs.
</p>
<p>
@@ -136,7 +141,7 @@
</p>
<p>
- At milestones 4 and 5 you'll have access to the final Android Wear 2.0
+ At milestone 4, you'll have access to the final Android Wear 2.0
APIs and SDK to develop with, as well as near-final system images to test
system behaviors and features. Android Wear 2.0 will use the Android N
API level at this time. You can begin final compatibility testing of your
@@ -196,9 +201,9 @@
</h3>
<p>
- You can download these hardware system images at <a href=
+ You can download these hardware system images from the <a href=
"{@docRoot}wear/preview/downloads.html">Download and Test with a
- Device</a>:
+ Device</a> page:
</p>
<ul>
@@ -210,7 +215,15 @@
</ul>
<p>
- Please keep in mind that the Developer Preview system images
+ To restore your device to its
+ original state during the preview, you can flash the
+ appropriate retail system image from
+ the <a href="{@docRoot}wear/preview/downloads.html">Download and
+ Test with a Device</a> page.
+ </p>
+
+ <p>
+ Please keep in mind that the preview system images
are for app developers only, and for compatibility testing and
early development only, and are not ready for day-to-day use.
</p>
diff --git a/docs/html/wear/preview/start.jd b/docs/html/wear/preview/start.jd
index 65d4b56..8fccdc8 100644
--- a/docs/html/wear/preview/start.jd
+++ b/docs/html/wear/preview/start.jd
@@ -107,10 +107,10 @@
<tr>
<td>
- <a href="http://storage.googleapis.com/androiddevelopers/shareables/wear-preview/wearable-support-preview-1-docs.zip">wearable-support-preview-1-docs.zip</a>
+ <a href="http://storage.googleapis.com/androiddevelopers/shareables/wear-preview/wearable-support-preview-2-docs.zip">wearable-support-preview-2-docs.zip</a>
</td>
- <td>MD5: 02f9dc7714c00076b323c9081655c3b2<br>
- SHA-1: 075f3821ee9b66a919a0e8086f79c12bc9576fb2
+ <td>MD5: afb770c9c5c0431bbcbdde186f1eae06<br>
+ SHA-1: 81d681e61cee01f222ea82e83297d23c4e55b8f3
</td>
</tr>
</table>
@@ -146,16 +146,26 @@
plugin.
</li>
- <li>In the <code>build.gradle</code> file for the Wear module, in the
- <code>dependencies</code> section, update the existing reference to the
+ <li>In the <code>build.gradle</code> file for the Wear module:
+ <ul>
+ <li>In the <code>android</code> section, update the
+ <code>compileSdkVersion</code> to 24.
+ </li>
+
+ <li>In the <code>android</code> section, update the
+ <code>targetSdkVersion</code> to 24.
+ </li>
+
+ <li>In the <code>dependencies</code> section, update
+ the existing reference to the
Wearable Support Library (for example, <code>compile
'com.google.android.support:wearable:1.4.0'</code>) by changing it to the
following, which requires that your the Google Repository <a href=
"#install_android_studio_and_the_latest_packages">is the latest
version</a>:
- <pre>
-compile 'com.google.android.support:wearable:2.0.0-alpha1'
- </pre>
+ <code>compile 'com.google.android.support:wearable:2.0.0-alpha2'</code>
+ </li>
+ </ul>
</li>
<li>See the following page for setting up a watch or emulator with a
@@ -190,13 +200,24 @@
wizard.
</li>
- <li>In the <code>build.gradle</code> file for the Wear module, in the
- <code>dependencies</code> section, update the existing reference to the
- Wearable Support Library (perhaps <code>compile
- 'com.google.android.support:wearable:1.4.0'</code>) to:
- <pre>
-compile 'com.google.android.support:wearable:2.0.0-alpha1'
- </pre>
+ <li>In the <code>build.gradle</code> file for the Wear module:
+ <ul>
+ <li>In the <code>android</code> section, update the
+ <code>compileSdkVersion</code> to 24.
+ </li>
+ <li>In the <code>android</code> section, update the
+ <code>targetSdkVersion</code> to 24.
+ </li>
+ <li>In the <code>dependencies</code> section, update
+ the existing reference to the
+ Wearable Support Library (for example, <code>compile
+ 'com.google.android.support:wearable:1.4.0'</code>) by changing it to the
+ following, which requires that your the Google Repository <a href=
+ "#install_android_studio_and_the_latest_packages">is the latest
+ version</a>:
+ <code>compile 'com.google.android.support:wearable:2.0.0-alpha2'</code>
+ </li>
+ </ul>
</li>
<li>See the following page for setting up a watch or emulator with a
diff --git a/docs/html/work/managed-configurations.jd b/docs/html/work/managed-configurations.jd
index dc3ef0d..91c0637 100644
--- a/docs/html/work/managed-configurations.jd
+++ b/docs/html/work/managed-configurations.jd
@@ -149,9 +149,9 @@
<restriction
android:key="downloadOnCellular"
- android:title="App is allowed to download data via cellular"
+ android:title="@string/download_on_cell_title"
android:restrictionType="bool"
- android:description="If 'false', app can only download data via Wi-Fi"
+ android:description="@string/download_on_cell_description"
android:defaultValue="true" />
</restrictions>
diff --git a/docs/image_sources/training/tv/tif/app-link-diagram.graffle.zip b/docs/image_sources/training/tv/tif/app-link-diagram.graffle.zip
new file mode 100644
index 0000000..8b6779d
--- /dev/null
+++ b/docs/image_sources/training/tv/tif/app-link-diagram.graffle.zip
Binary files differ