Merge "docs: performance: Reduce APK Sizes" into nyc-dev
diff --git a/docs/html/_redirects.yaml b/docs/html/_redirects.yaml
index 774339a..cf56f2b 100644
--- a/docs/html/_redirects.yaml
+++ b/docs/html/_redirects.yaml
@@ -799,10 +799,24 @@
   to: http://android-developers.blogspot.com/2016/03/first-preview-of-android-n-developer.html
 - from: /reference/org/apache/http/...
   to: /about/versions/marshmallow/android-6.0-changes.html#behavior-apache-http-client
-- from: /shareables/...
-  to: https://commondatastorage.googleapis.com/androiddevelopers/shareables/...
-- from: /downloads/...
-  to: https://commondatastorage.googleapis.com/androiddevelopers/...
+- from: /shareables/
+  to: https://commondatastorage.googleapis.com/androiddevelopers/shareables/
+- from: /downloads/
+  to: https://commondatastorage.googleapis.com/androiddevelopers/
+- from: /training/performance/battery/network/action-any-traffic.html
+  to: /topic/performance/power/network/action-any-traffic.html
+- from: /training/performance/battery/network/action-app-traffic.html
+  to: /topic/performance/power/network/action-app-traffic.html
+- from: /training/performance/battery/network/action-server-traffic.html
+  to: /topic/performance/power/network/action-server-traffic.html
+- from: /training/performance/battery/network/action-user-traffic.html
+  to: /topic/performance/power/network/action-user-traffic.html
+- from: /training/performance/battery/network/analyze-data.html
+  to: /topic/performance/power/network/analyze-data.html
+- from: /training/performance/battery/network/gather-data.html
+  to: /topic/performance/power/network/gather-data.html
+- from: /training/performance/battery/network/index.html
+  to: /topic/performance/power/network/index.html
 
 # Redirects for the new [dac]/topic/libraries/ area
 
@@ -1176,4 +1190,4 @@
 - from: /r/studio-ui/experimental-to-stable-gradle.html
   to: http://tools.android.com/tech-docs/new-build-system/gradle-experimental/experimental-to-stable-gradle
 - from: /r/studio-ui/sdk-manager.html
-  to: https://developer.android.com/studio/intro/update.html#sdk-manager
\ No newline at end of file
+  to: https://developer.android.com/studio/intro/update.html#sdk-manager
diff --git a/docs/html/jd_extras_en.js b/docs/html/jd_extras_en.js
index dc152f8..5784179 100644
--- a/docs/html/jd_extras_en.js
+++ b/docs/html/jd_extras_en.js
@@ -3613,6 +3613,59 @@
     "lang":"en",
     "type":"Video"
   },
+
+  {
+    "title":"Android Performance Testing Codelab",
+    "titleFriendly":"",
+    "summary":"This codelab shows how to create a stable and reusable testing harness to run performance tests on a very simple existing app.",
+    "url":"https://codelabs.developers.google.com/codelabs/android-perf-testing/index.html",
+    "group":"",
+    "keywords": ["testing"],
+    "tags": [
+    ],
+    "image":"images/testing/testing-icon.png",
+    "type":"google"
+  },
+
+  {
+    "title":"Introduction to Doze",
+    "category":"android developers",
+    "summary":"A new way for the device to preserve battery by entering into an idle state.",
+    "url":"https://www.youtube.com/watch?v=N72ksDKrX6c",
+    "group":"",
+    "keywords": ["android, performance","battery"],
+    "tags": ["video, performance"],
+    "image":"https://i1.ytimg.com/vi/N72ksDKrX6c/maxresdefault.jpg",
+    "lang":"en",
+    "type":"develop"
+  },
+
+  {
+    "title":"Performance Profiling Tools",
+    "category":"training",
+    "summary":"Take a look under the hood to identify performance bottlenecks.",
+    "url":"https://developer.android.com/tools/performance/index.html",
+    "group":"",
+    "keywords": ["android, performance","profiling"],
+    "tags": ["android, performance"],
+    "image":"/assets/images/resource-card-default-android.jpg",
+    "lang":"en",
+    "type":"develop"
+  },
+
+  {
+    "title":"Managing Your App's Memory",
+    "category":"training",
+    "summary":"Learn how you can proactively reduce memory usage while developing for Android.",
+    "url":"https://developer.android.com/training/articles/memory.html",
+    "group":"",
+    "keywords": ["android, performance","profiling"],
+    "tags": ["android, performance"],
+    "image":"/assets/images/resource-card-default-android.jpg",
+    "lang":"en",
+    "type":"develop"
+  },
+
   {
     "url":"https://www.youtube.com/watch?v=QDM52bblwlg",
     "image": "images/distribute/hero-family-discovery.jpg",
@@ -5379,12 +5432,26 @@
       "preview/support.html"
     ]
   },
+
   "preview/landing/videos/first": {
     "title": "",
     "resources": [
     "https://www.youtube.com/watch?v=CsulIu3UaUM"
     ]
   },
+
+  "develop/performance/landing": {
+    "title": "",
+    "resources": [
+      "https://android-developers.blogspot.com/2010/07/multithreading-for-performance.html",
+      "https://www.udacity.com/course/ud825",
+      "https://www.youtube.com/watch?v=N72ksDKrX6c",
+      "https://developer.android.com/tools/performance/index.html",
+      "https://codelabs.developers.google.com/codelabs/android-perf-testing/index.html",
+      "https://developer.android.com/training/articles/memory.html",
+    ]
+  },
+
   "preview/landing/more": {
     "title": "",
     "resources": [
diff --git a/docs/html/topic/performance/_book.yaml b/docs/html/topic/performance/_book.yaml
new file mode 100644
index 0000000..fb9c1d2
--- /dev/null
+++ b/docs/html/topic/performance/_book.yaml
@@ -0,0 +1,35 @@
+toc:
+- title: Optimizing Power Consumption
+  path: /topic/performance/power/index.html
+  section:
+  - title: Reducing Network Battery Drain
+    path: /topic/performance/power/network/index.html
+    path_attributes:
+    - name: description
+      value: Access the network while going easy on battery life.
+    section:
+    - title: Collecting Network Traffic Data
+      path: /topic/performance/power/network/gather-data.html
+    - title: Analyzing Network Traffic Data
+      path: /topic/performance/power/network/analyze-data.html
+    - title: Optimizing User-Initiated Network Use
+      path: /topic/performance/power/network/action-user-traffic.html
+    - title: Optimizing Server-Initiated Network Use
+      path: /topic/performance/power/network/action-server-traffic.html
+    - title: Optimizing General Network Use
+      path: /topic/performance/power/network/action-any-traffic.html
+  - title: Implementing Doze
+    path: /monitoring-device-state/doze-standby.html
+    path_attributes:
+    - name: description
+      value: Help ensure the device isn't depleting the battery when not in use.
+- title: Launch-Time Performance
+  path: /topic/performance/launch-time.html
+- title: Better Performance through Threading
+  path: /topic/performance/threads.html
+- title: Optimizing View Hierarchies
+  path: /topic/performance/optimizing-view-hierarchies.html
+- title: Intelligent Job-Scheduling
+  path: /topic/performance/scheduling.html
+- title: Reducing APK Size
+  path: /topic/performance/apk/reduce-apk-size.html
diff --git a/docs/html/topic/performance/images/cold-launch.png b/docs/html/topic/performance/images/cold-launch.png
new file mode 100644
index 0000000..2935ece
--- /dev/null
+++ b/docs/html/topic/performance/images/cold-launch.png
Binary files differ
diff --git a/docs/html/topic/performance/images/displayed-logcat.png b/docs/html/topic/performance/images/displayed-logcat.png
new file mode 100644
index 0000000..7dee884
--- /dev/null
+++ b/docs/html/topic/performance/images/displayed-logcat.png
Binary files differ
diff --git a/docs/html/topic/performance/images/lint-display.png b/docs/html/topic/performance/images/lint-display.png
new file mode 100644
index 0000000..e360938
--- /dev/null
+++ b/docs/html/topic/performance/images/lint-display.png
Binary files differ
diff --git a/docs/html/topic/performance/images/lint-inspect-code.png b/docs/html/topic/performance/images/lint-inspect-code.png
new file mode 100644
index 0000000..41604a1
--- /dev/null
+++ b/docs/html/topic/performance/images/lint-inspect-code.png
Binary files differ
diff --git a/docs/html/topic/performance/index.jd b/docs/html/topic/performance/index.jd
new file mode 100644
index 0000000..8f64404
--- /dev/null
+++ b/docs/html/topic/performance/index.jd
@@ -0,0 +1,39 @@
+page.title=Performance
+page.article=true
+page.metaDescription=Android Performance does nice things. Details to come.
+
+meta.tags="performance"
+page.tags="performance"
+
+@jd:body
+
+<iframe width="448" height="252" src="//www.youtube.com/embed/qk5F6Bxqhr4?utm_source=dac&utm_medium=video&utm_content=andfuntrain&utm_campaign=udacint?rel=0&hd=1" frameborder="0" allowfullscreen style="float: right; margin: 0 0 20px 20px;"></iframe>
+
+<p>Implementing a cool idea is a great start toward an app that delights users,
+but it's just the beginning. The next step is maximizing your app's performance.
+For example, users want apps that:</p>
+
+<ul>
+   <li>Use power sparingly.</li>
+   <li>Start up quickly.</li>
+   <li>Respond quickly to user interaction.</li>
+</ul>
+
+<p>This section provides you with the know-how you need in order to make
+your apps not only cool, but also performant. Read on to discover how to
+develop apps that are power-thrifty, responsive, efficient, and well-behaved.</p>
+
+
+
+
+<section class="dac-section dac-small" id="latest-games"><div class="wrap">
+  <h2 class="norule" style="margin:0 0">More resources</h2>
+  <div class="resource-widget resource-flow-layout col-16"
+       data-query="collection:develop/performance/landing"
+       data-sortOrder="random"
+       data-cardSizes="6x6"
+       data-maxResults="24"
+       data-items-per-page="24"
+       data-initial-results="6"></div>
+  </div>
+</section>
\ No newline at end of file
diff --git a/docs/html/topic/performance/launch-time.jd b/docs/html/topic/performance/launch-time.jd
new file mode 100644
index 0000000..c9ce1d5
--- /dev/null
+++ b/docs/html/topic/performance/launch-time.jd
@@ -0,0 +1,565 @@
+page.title=Launch-Time Performance
+@jd:body
+
+<div id="qv-wrapper">
+<div id="qv">
+
+<h2>In this document</h2>
+<ol>
+<li><a href="#internals">Launch Internals</a>
+  <ol>
+    <li><a href="#cold">Cold start</a></li>
+    <li><a href="#warm">Warm start</a></li>
+    <li><a href="#lukewarm">Lukewarm start</a></li>
+  </ol>
+</li>
+<li><a href="#profiling">Profiling Launch Performance</a>
+  <ol>
+    <li><a href="#time-initial">Time to initial display</a></li>
+    <li><a href="#time-full">Time to full display</a></li>
+  </ol>
+</li>
+<li><a href="#common">Common Issues</a>
+   <ol>
+      <li><a href="#heavy-app">Heavy app initialization</a></li>
+      <li><a href="#heavy-act">Heavy activity initialization</a></li>
+      <li><a href="#themed">Themed launch screens</a></li>
+   </ol>
+      </li>
+</ol>
+</div>
+</div>
+
+<p>
+Users expect apps to be responsive and fast to load. An app with a slow startup
+time doesn’t meet this expectation, and can be disappointing to users. This
+sort of poor experience may cause a user to rate your app poorly on the Play
+store, or even abandon your app altogether.
+</p>
+
+<p>
+This document provides information to help you optimize your app’s launch time.
+It begins by explaining the internals of the launch process. Next, it discusses
+how to profile startup performance. Last, it describes some common startup-time
+issues, and gives some hints on how to address them.
+</p>
+
+<h2 id="internals">Launch Internals</h2>
+
+<p>
+App launch can take place in one of three states, each affecting how
+long it takes for your app to become visible to the user: cold start,
+warm start, and lukewarm start. In a cold start, your app starts from scratch.
+In the other states, the system needs to bring the app from the background to
+the foreground. We recommend that you always optimize based on an assumption of
+a cold start. Doing so can improve the performance of warm and lukewarm starts,
+as well.
+</p>
+
+<p>
+To optimize your app for fast startup, it’s useful to understand what’s
+happening at the system and app levels, and how they interact, in each of
+these states.
+</p>
+
+<h3 id="cold">Cold start</h3>
+
+<p>
+A cold start refers to an app’s starting from scratch: the system’s process
+has not, until this start, created the app’s process. Cold starts happen in
+cases such as your app’s being launched for the first time since the device
+booted, or since the system killed the app. This type of start presents the
+greatest challenge in terms of minimizing startup time, because the system
+and app have more work to do than in the other launch states.
+</p>
+
+<p>
+At the beginning of a cold start, the system has three tasks. These tasks are:
+</p>
+
+<ol style="1">
+   <li>Loading and launching the app.</li>
+   <li>Displaying a blank starting window for the app immediately after launch.
+   </li>
+   <li>Creating the app
+   <a href="{docRoot}guide/components/processes-and-threads.html#Processes">
+   process.</a></li>
+</ol>
+<br/>
+<p>
+As soon as the system creates the app process, the app process is responsible
+for the next stages. These stages are:
+</p>
+
+<ol style="1">
+   <li>Creating the app object.</li>
+   <li>Launching the main thread.</li>
+   <li>Creating the main activity.</li>
+   <li>Inflating views.</li>
+   <li>Laying out the screen.</li>
+   <li>Performing the initial draw.</li>
+</ol>
+
+<p>
+Once the app process has completed the first draw, the system process swaps
+out the currently displayed background window, replacing it with the main
+activity. At this point, the user can start using the app.
+</p>
+
+<p>
+Figure 1 shows how the system and app processes hand off work between each
+other.
+</p>
+<br/>
+
+  <img src="{@docRoot}performance/images/cold-launch.png">
+  <p class="img-caption">
+    <strong>Figure 1.</strong> A visual representation of the important parts of
+    a cold application launch.
+  </p>
+
+<p>
+Performance issues can arise during creation of the app and
+creation of the activity.
+</p>
+
+<h4 id="app-creation">Application creation</h4>
+
+<p>
+When your application launches, the blank starting window remains on the screen
+until the system finishes drawing the app for the first time. At that point,
+the system process swaps out the starting window for your app, allowing the
+user to start interacting with the app.
+</p>
+
+<p>
+If you’ve overloaded {@link android.app.Application#onCreate() Application.oncreate()}
+in your own app, the app starts by calling this
+method on your app object. Afterwards, the app spawns the main thread, also
+known as the UI thread, and tasks it with creating your main activity.
+</p>
+
+<p>
+From this point, system- and app-level processes proceed in accordance with
+the <a href="{docRoot}guide/topics/processes/process-lifecycle.html">
+app lifecycle stages</a>.
+</p>
+
+<h4 id="act-creation">Activity creation</h4>
+
+<p>
+After the app process creates your activity, the activity performs the
+following operations:
+</p>
+
+<ol style="1">
+   <li>Initializes values.</li>
+   <li>Calls constructors.</li>
+   <li>Calls the callback method, such as
+   {@link android.app.Activity#onCreate(android.os.Bundle) Activity.onCreate()},
+   appropriate to the current lifecycle state of the activity.</li>
+</ol>
+
+<p>
+Typically, the
+{@link android.app.Activity#onCreate(android.os.Bundle) onCreate()}
+method has the greatest impact on load time, because it performs the work with
+the highest overhead: loading and inflating views, and initializing the objects
+needed for the activity to run.
+</p>
+
+<h3 id="warm">Warm start</h3>
+
+<p>
+A warm start of your application is much simpler and lower-overhead than a
+cold start. In a warm start, all the system does is bring your activity to
+the foreground. If all of your application’s activities are still resident in
+memory, then the app can avoid having to repeat object initialization, layout
+inflation, and rendering.
+</p>
+
+<p>
+However, if some memory has been purged in response to memory trimming
+events, such as
+{@link android.content.ComponentCallbacks2#onTrimMemory(int) onTrimMemory()},
+then those objects will need to be recreated in
+response to the warm start event.
+</p>
+
+<p>
+A warm start displays the same on-screen behavior as a cold start scenario:
+The system process displays a blank screen until the app has finished rendering
+the activity.
+</p>
+
+<h3 id="lukewarm">Lukewarm start</h3>
+
+<p>
+A lukewarm start encompasses some subset of the operations that
+take place during a cold start; at the same time, it represents less overhead
+than a warm start. There are many potential states that could be considered
+lukewarm starts. For instance:
+</p>
+
+<ul>
+   <li>The user backs out of your app, but then re-launches it. The process may
+       have continued to run, but the app must recreate the activity from scratch
+       via a call to
+       {@link android.app.Activity#onCreate(android.os.Bundle) onCreate()}.</li>
+
+   <li>The system evicts your app from memory, and then the user re-launches it.
+       The process and the Activity need to be restarted, but the task can
+       benefit somewhat from the saved instance state bundle passed into
+       {@link android.app.Activity#onCreate(android.os.Bundle) onCreate()}.</li>
+</ul>
+
+<h2 id="profiling">Profiling Launch Performance</h2>
+
+<p>
+In order to properly diagnose start time performance, you can track metrics
+that show how long it takes your application to start.
+</p>
+
+<h3 id="time-initial">Time to initial display</h3>
+
+<p>
+From Android 4.4 (API level 19), logcat includes an output line containing
+a value called {@code Displayed}. This value represents
+the amount of time elapsed between launching the process and finishing drawing
+the corresponding activity on the screen. The elapsed time encompasses the
+following sequence of events:
+</p>
+
+<ol style="1">
+   <li>Launch the process.</li>
+   <li>Initialize the objects.</li>
+   <li>Create and initialize the activity.</li>
+   <li>Inflate the layout.</li>
+   <li>Draw your application for the first time.</li>
+</ol>
+
+<p>
+The reported log line looks similar to the following example:
+</p>
+
+<pre class="no-pretty-print">
+ActivityManager: Displayed com.android.myexample/.StartupTiming: +3s534ms
+</pre>
+
+<p>
+If you’re tracking logcat output from the command line, or in a terminal,
+finding the elapsed time is straightforward. To find elapsed time in
+Android Studio, you must disable filters in your logcat view. Disabling the
+filters is necessary because the system server, not the app itself, serves
+this log.
+</p>
+
+<p>
+Once you’ve made the appropriate settings, you can easily search for the
+correct term to see the time. Figure 2 shows how to disable filters, and,
+in the second line of output from the bottom, an example of logcat output of
+the {@code Displayed} time.
+</p>
+<br/>
+
+  <img src="{@docRoot}performance/images/displayed-logcat.png">
+  <p class="img-caption">
+    <strong>Figure 2.</strong> Disabling filters, and
+    finding the {@code Displayed} value in logcat.
+  </p>
+
+<p>
+The {@code Displayed} metric in the logcat output does not necessarily capture
+the amount of time until all resources are loaded and displayed: it leaves out
+resources that are not referenced in the layout file or that the app creates
+as part of object initialization. It excludes these resources because loading
+them is an inline process, and does not block the app’s initial display.
+</p>
+
+<h3 id="time-full">Time to full display</h3>
+
+<p>
+You can use the {@link android.app.Activity#reportFullyDrawn()} method to
+measure the elapsed time
+between application launch and complete display of all resources and view
+hierarchies. This can be valuable in cases where an app performs lazy loading.
+In lazy loading, an app does not block the initial drawing of the window, but
+instead asynchronously loads resources and updates the view hierarchy.
+</p>
+
+<p>
+If, due to lazy loading, an app’s initial display does not include all
+resources, you might consider the completed loading and display of all
+resources and views as a separate metric: For example, your UI might be
+fully loaded, with some text drawn, but not yet display images that the
+app must fetch from the network.
+</p>
+
+<p>
+To address this concern, you can manually call
+{@link android.app.Activity#reportFullyDrawn()}
+to let the system know that your activity is
+finished with its lazy loading. When you use this method, the value
+that logcat displays is the time elapsed
+since the creation of the application object, and the moment
+{@link android.app.Activity#reportFullyDrawn()} is called.
+</p>
+
+<p>
+If you learn that your display times are slower than you’d like, you can
+go on to try to identify the bottlenecks in the startup process.
+</p>
+
+<h4 id="bottlenecks">Identifying bottlenecks</h4>
+
+<p>
+Two good ways to look for bottlenecks are Android Studio’s Method Tracer tool
+and inline tracing. To learn about Method Tracer, see that tool’s
+<a href="{docRoot}studio/profile/am-methodtrace.html">documentation</a>.
+</p>
+
+<p>
+If you do not have access to the Method Tracer tool, or cannot start the tool
+at the correct time to gain log information, you can gain similar insight
+through inline tracing inside of your apps’ and activities’ {@code onCreate()}
+methods. To learn about inline tracing, see the reference documentation for
+the {@link android.os.Trace} functions, and for the
+<a href="{docRoot}studio/profile/systrace-commandline.html">Systrace</a> tool.
+</p>
+
+<h2 id="common">Common Issues</h2>
+
+<p>
+This section discusses several issues that often affect apps’ startup
+performance. These issues chiefly concern initializing app and activity
+objects, as well as the loading of screens.
+</p>
+
+<h3 id="heavy-app">Heavy app initialization</h3>
+
+<p>
+Launch performance can suffer when your code overrides the {@code Application}
+object, and executes heavy work or complex logic when initializing that object.
+Your app may waste time during startup if your Application subclasses perform
+initializations that don’t need to be done yet. Some initializations may be
+completely unnecessary: for example, initializing state information for the
+main activity, when the app has actually started up in response to an intent.
+With an intent, the app uses only a subset of the previously initialized state
+data.
+</p>
+
+<p>
+Other challenges during app initialization include garbage-collection events
+that are impactful or numerous, or disk I/O happening concurrently with
+initialization, further blocking the initialization process. Garbage collection
+is especially a consideration with the Dalvik runtime; the Art runtime performs
+garbage collection concurrently, minimizing that operation's impact.
+</p>
+
+<h4 id="diagnosing-1">Diagnosing the problem</h4>
+
+<p>
+You can use method tracing or inline tracing to try to diagnose the problem.
+</p>
+
+<h5>Method tracing</h5>
+
+<p>
+Running the Method Tracer tool reveals that the
+{@link android.app.Instrumentation#callApplicationOnCreate(android.app.Application) callApplicationOnCreate()}
+method eventually calls your {@code com.example.customApplication.onCreate}
+method. If the tool shows that these
+methods are taking a long time to finish executing, you should explore further
+to see what work is occurring there.
+</p>
+
+<h5>Inline tracing</h5>
+
+<p>
+Use inline tracing to investigate likely culprits including:
+</p>
+
+<ul>
+   <li>Your app’s initial {@link android.app.Application#onCreate()}
+   function.</li>
+   <li>Any global singleton objects your app initializes.</li>
+   <li>Any disk I/O, deserialization, or tight loops that might be occurring
+   during the bottleneck.
+</ul>
+
+
+<h4 id="solutions-1">Solutions to the problem</h4>
+
+<p>
+Whether the problem lies with unnecessary initializations or disk I/O,
+the solution calls for lazy-initializing objects: initializing only those
+objects that are immediately needed. For example, rather than creating global
+static objects, instead, move to a singleton pattern, where the app initalizes
+objects only the first time it accesses them.
+</p>
+
+<h3 id="heavy-act">Heavy activity initialization</h4>
+
+<p>
+Activity creation often entails a lot of high-overhead work. Often, there are
+opportunities to optimize this work to achieve performance improvements. Such
+common issues include:
+</p>
+
+<ul>
+   <li>Inflating large or complex layouts.</li>
+   <li>Blocking screen drawing on disk, or network I/O.</li>
+   <li>Loading and decoding bitmaps.</li>
+   <li>Rasterizing {@link android.graphics.drawable.VectorDrawable VectorDrawable} objects.</li>
+   <li>Initialization of other subsystems of the activity.</li>
+</ul>
+
+<h4 id="diagnosing-2">Diagnosing the problem</h4>
+
+<p>
+In this case, as well, both method tracing and inline tracing can prove useful.
+</p>
+
+<h5>Method tracing</h5>
+
+<p>
+When running the Method Tracer tool, the particular areas to
+focus on your your app’s {@link android.app.Application} subclass constructors and
+{@code com.example.customApplication.onCreate()} methods.
+</p>
+
+<p>
+If the tool shows that these methods are taking a long time to finish
+executing, you should explore further to see what work is occurring there.
+</p>
+
+<h5>Inline tracing</h5>
+
+<p>
+Use inline tracing to investigate likely culprits including:
+</p>
+
+<ul>
+   <li>Your app’s initial {@link android.app.Application#onCreate()}
+   function.</li>
+   <li>Any global singleton objects it initializes.</li>
+   <li>Any disk I/O, deserialization, or tight loops that might be occurring
+   during the bottleneck.</li>
+</ul>
+
+<h4 id="solutions-2">Solutions to the problem</h4>
+
+<p>
+There are many potential bottlenecks, but two common problems and remedies
+are as follows:
+</p>
+
+<ul>
+   <li>The larger your view hierarchy, the more time the app takes to inflate
+   it. Two steps you can take to address this issue are:
+
+   <ul>
+      <li>Flattening your view hierarchy by reducing redundant or nested
+      layouts.</li>
+
+      <li>Not inflating parts of the UI that do not need to be visible during
+      launch. Instead, use use a {@link android.view.ViewStub} object as a
+      placeholder for sub-hierarchies that the app can inflate at a more
+      appropriate time.</li>
+   </ul>
+   </li>
+
+   <li>Having all of your resource initialization on the main
+       thread can also slow down startup. You can address this issue as follows:
+
+   <ul>
+      <li>Move all resource initialization so that the app can perform it
+      lazily on a different thread.</li>
+      <li>Allow the app to load and display your views, and then later
+      update visual properties that are dependent on bitmaps and other
+      resources.</li>
+   </ul>
+   </li>
+
+<h3 id="themed">Themed launch screens</h3>
+
+
+<p>
+You may wish to theme your app’s loading experience, so that the app’s
+launch screen is thematically consistent with the rest of the app, instead of
+with the system theming. Doing so can hide a slow activity launch.
+</p>
+
+<p>
+A common way to implement a themed launch screen is to use the the
+{@link android.R.attr#windowDisablePreview} theme attribute to turn off
+the initial blank screen
+that the system process draws when launching the app. However, this approach
+can result in a longer startup time than apps that don’t suppress the preview
+window. Also, it forces the user to wait with no feedback while the activity
+launches, making them wonder if the app is functioning properly.
+</p>
+
+<h4 id="diagnosing-3">Diagnosing the problem</h4>
+
+<p>
+You can often diagnose this problem by observing a slow response when a user
+launches your app. In such a case, the screen may seem to be frozen, or to
+have stopped responding to input.
+</p>
+
+<h4 id="solutions-3">Solutions to the problem</h4>
+
+<p>
+We recommend that, rather than disabling the preview window, you
+follow the common
+<a href="http://www.google.com/design/spec/patterns/launch-screens.html#">
+Material Design</a> patterns. You can use the activity's
+{@code windowBackground} theme attribute to provide a simple custom drawable
+for the starting activity.
+</p>
+
+<p>
+For example, you might create a new drawable file and reference it from the
+layout XML and app manifest file as follows:
+</p>
+
+<p>Layout XML file:</p>
+
+<pre>
+&lt;layer-list xmlns:android="http://schemas.android.com/apk/res/android" android:opacity="opaque"&gt;
+  &lt;!-- The background color, preferably the same as your normal theme --&gt;
+  &lt;item android:drawable="@android:color/white"/&gt;
+  &lt;!-- Your product logo - 144dp color version of your app icon --&gt;
+  &lt;item&gt;
+    &lt;bitmap
+      android:src="@drawable/product_logo_144dp"
+      android:gravity="center"/&gt;
+  &lt;/item&gt;
+&lt;/layer-list&gt;
+</pre>
+
+<p>Manifest file:</p>
+
+<pre>
+&lt;activity ...
+android:theme="@style/AppTheme.Launcher" /&gt;
+</pre>
+
+<p>
+The easiest way to transition back to your normal theme is to call
+{@link android.view.ContextThemeWrapper#setTheme(int) setTheme(R.style.AppTheme)}
+before calling {@code super.onCreate()} and {@code setContentView()}:
+</p>
+
+<pre class="no-pretty-print">
+public class MyMainActivity extends AppCompatActivity {
+  &#64;Override
+  protected void onCreate(Bundle savedInstanceState) {
+    // Make sure this is before calling super.onCreate
+    setTheme(R.style.Theme_MyApp);
+    super.onCreate(savedInstanceState);
+    // ...
+  }
+}
+</pre>
diff --git a/docs/html/topic/performance/optimizing-view-hierarchies.jd b/docs/html/topic/performance/optimizing-view-hierarchies.jd
new file mode 100644
index 0000000..1738acb
--- /dev/null
+++ b/docs/html/topic/performance/optimizing-view-hierarchies.jd
@@ -0,0 +1,388 @@
+page.title=Performance and View Hierarchies
+@jd:body
+
+<div id="qv-wrapper">
+<div id="qv">
+
+<h2>In this document</h2>
+<ol>
+<li><a href="#lmp">Layout-and-Measure Performance</a>
+  <ol>
+    <li><a href="#managing">Managing complexity: layouts matter</a></li>
+    <li><a href="#double">Double taxation</a></li>
+  </ol>
+</li>
+<li><a href="#dx">Diagnosing View Hierarchy Issues</a>
+  <ol>
+    <li><a href="#systrace">Systrace</a></li>
+    <li><a href="#profile">Profile GPU rendering</a></li>
+    <li><a href="#lint">Lint</a></li>
+    <li><a href="#hv">Hierarchy Viewer</a></li>
+  </ol>
+</li>
+<li><a href="#solving">Solving View Hierarchy Issues</a>
+   <ol>
+      <li><a href="#removing">Removing redundant nested layouts</a></li>
+      <li><a href="#cheaper">Adopting a cheaper layout</a></li>
+   </ol>
+      </li>
+</ol>
+</div>
+</div>
+
+
+<p>
+The way you manage the hierarchy of your {@link android.view.View} objects can
+have a substantial impact on your app’s performance. This page describes how to
+assess whether your view hierarchy is slowing your app down, and offers some
+strategies for addressing issues that may arise.
+</p>
+
+<h2 id="lmp">Layout and Measure Performance</h2>
+<p>
+The rendering pipeline includes a <em>layout-and-measure</em>
+stage, during which the system appropriately positions the relevant items in
+your view hierarchy. The measure part of this stage determines the sizes and
+boundaries of {@link android.view.View} objects. The layout part determines where on the screen to
+position the {@link android.view.View} objects.
+</p>
+
+<p>
+Both of these pipeline stages incur some small cost per view or layout that they
+process. Most of the time, this cost is minimal and doesn’t noticeably affect
+performance. However, it can be greater when an app adds or removes View
+objects, such as when a {@link android.support.v7.widget.RecyclerView}
+object recycles them or reuses them. The
+cost can also be higher if a {@link android.view.View} object needs to consider
+resizing to main its constraints: For example, if your app calls
+{@link android.widget.TextView#setText(char[], int, int) SetText()} on a
+{@link android.view.View} object that wraps text, the
+{@link android.view.View} may need to resize.
+</p>
+
+<p>
+If cases like these take too long, they can prevent a frame from rendering
+within the allowed 16ms, so that frames are dropped, and animation becomes
+janky.
+</p>
+
+<p>
+Because you cannot move these operations to a worker thread&mdash;your app must
+process them on the main thread&mdash;your best bet is to optimize them so that
+they can take as little time as possible.
+</p>
+
+<h3 id="managing">Managing complexity: layouts matter</h3>
+
+<p>
+Android <a
+href="{@docRoot}guide/topics/ui/declaring-layout.html">Layouts</a>
+allow you to nest UI objects in the view hierarchy. This nesting can also impose
+a layout cost. When your app processes an object for layout, the app performs
+the same process on all children of the layout as well. For a complicated
+layout, sometimes a cost only arises the first time the system computes the
+layout. For instance, when your app recycles a complex list item in a
+{@link android.support.v7.widget.RecyclerView} object, the
+system needs to lay out all of the objects. In another example, trivial changes
+can propagate up the chain toward the parent
+until they reach an object that doesn’t affect the size of the parent.
+</p>
+
+<p>
+The most common case in which layout takes an especially long time is when
+hierarchies of {@link android.view.View} objects are nested within one another. Each nested layout
+object adds cost to the layout stage. The flatter your hierarchy, the less
+time that it takes for the layout stage to complete.
+</p>
+
+<p>
+If you are using the {@link android.widget.RelativeLayout} class, you may be able to achieve the same
+effect, at lower cost, by using nested, unweighted
+{@link android.widget.LinearLayout} views instead. Additionally, if your app
+targets Android N (API level 24), it is likely that
+you can use a special layout editor to create a <a
+href="http://tools.android.com/tech-docs/layout-editor">{@code ConstraintLayout}</a>
+object instead of {@link android.widget.RelativeLayout}. Doing so allows you
+to avoid many of the issues this section
+describes. The <a
+href="http://tools.android.com/tech-docs/layout-editor">{@code ConstraintLayout}</a>
+class offers similar layout control, but
+with much-improved performance. This class uses its own constraint-solving
+system to resolve relationships between views in a very different way from
+standard layouts.
+</p>
+
+<h3 id="double">Double Taxation</h3>
+
+<p>
+Typically, the framework executes the <a
+href="{@docRoot}guide/topics/ui/declaring-layout.html">layout</a>
+or measure stage in a single pass and quite quickly. However, with some more
+complicated layout cases, the framework may have to iterate multiple times on
+the layout or measure stage before ultimately positioning the elements. Having
+to perform more than one layout-and-measure iteration is referred to as
+<em>double taxation.</em>
+</p>
+
+<p>
+For example, when you use the {@link android.widget.RelativeLayout} container, which allows you to
+position {@link android.view.View} objects with respect to the positions of other {@link android.view.View} objects, the
+framework performs the following actions:
+</p>
+
+<ol style="1">
+   <li>Executes a layout-and-measure pass, during which the framework calculates
+each child object’s position and size, based on each child’s request.
+   <li>Uses this data, also taking object weights into account, to figure out the
+proper position of correlated views.
+   <li>Performs a second layout pass to finalize the objects’ positions.
+   <li>Goes on to the next stage of the rendering process.</li></ol>
+
+<p>
+The more levels your view hierarchy has, the greater the potential performance
+penalty.
+</p>
+
+<p>
+Containers other than {@link android.widget.RelativeLayout} may also give rise to double taxation. For
+example:
+</p>
+
+<ul>
+   <li>A {@link android.widget.LinearLayout} view
+could result in a double layout-and-measure pass if you make it horizontal.
+A double layout-and-measure pass may also occur in a vertical orientation if you
+add <a
+href="{@docRoot}reference/android/widget/LinearLayout.html#attr_android:measureWithLargestChild">measureWithLargestChild</a>,
+in which case the framework may need to do a second pass to resolve the proper
+sizes of objects.
+   <li>The {@link android.widget.GridLayout}
+has a similar issue. While this container also allows relative positioning, it
+normally avoids double taxation by pre-processing the positional relationships
+among child views. However, if the layout uses weights or fill with the
+{@link android.view.Gravity} class, the
+benefit of that preprocessing is lost, and the framework may have to perform
+multiple passes if it the container were a {@link android.widget.RelativeLayout}.</li>
+</ul>
+<p>
+Multiple layout-and-measure passes are not, in themselves, a performance burden.
+But they can become so if they’re in the wrong spot. You should be wary of
+situations where one of the following conditions applies to your container:
+</p>
+
+<ul>
+   <li>It is a root element in your view hierarchy.
+   <li>It has a deep view hierarchy beneath it.
+   <li>It is nested.
+   <li>There are many instances of it populating the screen, similar to children
+   in a {@link android.widget.ListView} object.</li>
+</ul>
+
+<h2 id="dx">Diagnosing View Hierarchy Issues</h2>
+
+<p>
+Layout performance is a complex problem with many facets. There are a couple of
+tools that can give you solid indications about where performance bottlenecks
+are occurring. A few other tools provide less definitive information, but can
+also provide helpful hints.
+</p>
+
+<p>
+<h3 id="systrace">Systrace</h3>
+</p>
+
+<p>
+One tool that provides excellent data about performance is <a
+href="{@docRoot}studio/profile/systrace.html">Systrace</a>,
+which is built into Android Studio. The Systrace tool allows you to collect and
+inspect timing information across an entire Android device, allowing you to see
+specifically where performance bottlenecks arise. For more information about
+Systrace, see <a href=”{docRoot}<a href="{@docRoot}studio/profile/systrace.html">
+Analyze UI Performance with Systrace</a>.
+</p>
+
+<h3 id="profile">Profile GPU rendering</h3>
+
+<p>
+The other tool most likely to provide you with concrete information about
+performance bottlenecks is the on-device <a
+href="{@docRoot}studio/profile/dev-options-rendering.html">
+Profile GPU rendering</a> tool, available on devices powered by Android 6.0 (API
+level 23) and later.  This tool allows you to see how long the layout-and-measurestage is
+ taking for <a href="https://youtu.be/erGJw8WDV74">each frame
+of rendering</a>. This data can help you diagnose runtime performance issues,
+and help you determine what, if any layout-and-measure issues you need to
+address.
+</p>
+
+<p>
+In its graphical representation of the data it captures, <a
+href="{@docRoot}studio/profile/dev-options-rendering.html">Profile
+GPU rendering</a> uses the color blue to represent layout time. For more
+information about how to use this tool, see <a
+href="{@docRoot}studio/profile/dev-options-rendering.html">Profile
+GPU Rendering Walkthrough.</a>
+</p>
+
+<h3 id="lint">Lint</h3>
+
+<p>
+Android Studio’s <a
+href="{@docRoot}studio/write/lint.html">Lint</a> tool can
+help you gain a sense of inefficiencies in the view hierarchy. To use this tool,
+select <strong>Analyze > Inspect Code</strong>, as shown in Figure 1.
+</p>
+
+  <img src="{@docRoot}topic/performance/images/lint-inspect-code.png">
+  <p class="img-caption">
+    <strong>Figure 1.</strong> Locating <strong>Inspect Code</strong> in the
+Android Studio.
+  </p>
+
+<p>
+Information about various layout items appears under
+<em>Android > Lint > Performance</em>. To see more detail,
+you can click on each item to expand it, and see more
+information in the pane on the right side of the screen.
+Figure 2 shows an example of such a display.
+</p>
+
+  <img src="{@docRoot}topic/performance/images/lint-display.png">
+  <p class="img-caption">
+    <strong>Figure 2.</strong> Viewing information about specific
+issues that the lint tool has identified.
+  </p>
+
+
+<p>
+Clicking on one of these items reveals, in the pane to the right, the problem
+associated with that item.
+</p>
+
+<p>
+To understand more about specific topics and issues in this area, see the <a
+href="{@docRoot}studio/write/lint.html">Lint
+</a>documentation.
+</p>
+
+<h3 id="hv">Hierarchy Viewer</h3>
+
+<p>
+Android Studio’s <a
+href="{@docRoot}studio/profile/hierarchy-viewer.html">Hierarchy
+Viewer</a> tool provides a visual representation of your app’s view hierarchy.
+It is a good way to navigate the hierarchy of your app, providing a clear visual
+representation of a particular view’s parent chain, and allowing you to inspect
+the layouts that your app constructs.
+</p>
+
+<p>
+The views that Hierarchy Viewer presents can also help identify performance
+problems arising from double taxation. It can also provide an easy way for you
+to identify deep chains of nested layouts, or layout areas with a large amount
+of nested children, another potential source of performance costs. In these
+scenarios, the layout-and-measure stages can be particularly costly,
+resulting in performance issues.
+</p>
+
+<p>
+You can also can get a sense of relative time taken by layout-and-measure
+operations by clicking the “profile node” button.
+</p>
+
+<p>
+For more information about Hierarchy Viewer, see <a
+href="{@docRoot}studio/profile/optimize-ui.html#HierarchyViewer">Optimizing
+Your UI</a>.
+</p>
+
+<h2 id="solving">Solving View Hierarchy Issues</h2>
+
+<p>
+The fundamental concept behind solving performance problems that arise from view
+hierarchies is simple in concept, but more difficult in practice. Preventing
+view hierarchies from imposing performance penalties encompasses the dual goals
+of flattening your view hierarchy and reducing double taxation. This section
+discusses some strategies for pursuing these goals.
+</p>
+
+<h3 id="removing">Removing redundant nested layouts</h3>
+
+<p>
+Developers often use more nested layouts than necessary. For example, a
+{@link android.widget.RelativeLayout} container might contain a single child that is also a
+{@link android.widget.RelativeLayout} container. This nesting amounts to redundancy, and adds
+unnecessary cost to the view hierarchy.
+</p>
+
+<p>
+Lint can often flag this problem for you, reducing debugging time.
+</p>
+
+<h3>Adopting Merge/Include </h3>
+<p>
+One frequent cause of redundant nested layouts is the <a
+href="{@docRoot}training/improving-layouts/reusing-layouts.html">
+&lt;include&gt;
+tag</a>. For example, you may define a re-usable layout as follows:
+</p>
+
+<pre class="prettyprint">
+&lt;LinearLayout&gt;
+    &lt;!-- some stuff here --&gt;
+&lt;/LinearLayout&gt;
+&lt;/pre&gt;
+</pre>
+
+<p>
+And then an include tag to add this item to the parent container:
+</p>
+
+<pre class="prettyprint">
+&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:orientation="vertical"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:background="@color/app_bg"
+    android:gravity="center_horizontal"&gt;
+
+    &lt;include layout="@layout/titlebar"/&gt;
+
+    &lt;TextView android:layout_width="match_parent"
+              android:layout_height="wrap_content"
+              android:text="@string/hello"
+              android:padding="10dp" /&gt;
+
+    ...
+
+&lt;/LinearLayout&gt;
+</pre>
+
+<p>
+The include unnecessarily nests the first layout within the second layout.
+</p>
+
+<p>
+The <a
+href="{@docRoot}training/improving-layouts/reusing-layouts.html#Merge">merge
+</a>tag can help prevent this issue. For information about this tag, see <a
+href="{@docRoot}training/improving-layouts/reusing-layouts.html#Merge">Re-using
+Layouts with &lt;include&gt;</a>.
+</p>
+
+<h3 id="cheaper">Adopting a cheaper layout</h3>
+
+<p>
+You may not be able to adjust your existing layout scheme so that it doesn’t
+contain redundant layouts. In certain cases, the only solution may be to flatten
+your hierarchy by switching over to an entirely different layout type.
+</p>
+
+<p>
+For example, you may find that a {@link android.widget.TableLayout}
+provides the same functionality as a more complex layout with many
+positional dependencies. In the N release of Android, the 
+<a
+href="http://tools.android.com/tech-docs/layout-editor">{@code ConstraintLayout}</a> class provides similar functionality to
+{@link android.widget.RelativeLayout}, but at a significantly lower cost.
+</p>
diff --git a/docs/html/topic/performance/performance_toc.cs b/docs/html/topic/performance/performance_toc.cs
new file mode 100644
index 0000000..49191bc
--- /dev/null
+++ b/docs/html/topic/performance/performance_toc.cs
@@ -0,0 +1,2289 @@
+<ul id="nav">
+  <li class="nav-section">
+    <div class="nav-section-header">
+      <a href="<?cs var:toroot ?>training/index.html">
+        Getting Started
+      </a>
+    </div>
+
+    <ul>
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/basics/firstapp/index.html"
+             description=
+             "After you've installed the Android SDK, start with this class
+             to learn the basics about Android app development."
+            >It worked!!</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/basics/firstapp/creating-project.html">
+            Creating an Android Project
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/basics/firstapp/running-app.html">
+            Running Your Application
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/basics/firstapp/building-ui.html">
+            Building a Simple User Interface
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/basics/firstapp/starting-activity.html">
+            Starting Another Activity
+          </a>
+          </li>
+        </ul>
+      </li>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/basics/supporting-devices/index.html"
+             description=
+             "How to build your app with alternative resources that provide an
+             optimized user experience on multiple device form factors using a single APK."
+            >Supporting Different Devices</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/basics/supporting-devices/languages.html">
+            Supporting Different Languages
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/basics/supporting-devices/screens.html">
+            Supporting Different Screens
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/basics/supporting-devices/platforms.html">
+            Supporting Different Platform Versions
+          </a>
+          </li>
+        </ul>
+      </li>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/basics/activity-lifecycle/index.html"
+             ja-lang="アクティビティのライフサイクル 管理"
+             ko-lang="액티비티 수명 주기 관리하기"
+             pt-br-lang="Como gerenciar o ciclo de vida da atividade"
+             ru-lang="Управление жизненным циклом операций"
+             zh-cn-lang="管理活动生命周期"
+             zh-tw-lang="管理應用行為顯示生命週期"
+             description=
+             "How Android activities live and die and how to create
+             a seamless user experience by implementing lifecycle callback methods."
+            >Managing the Activity Lifecycle</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/basics/activity-lifecycle/starting.html"
+             ja-lang="アクティビティを開始する"
+             ko-lang="액티비티 시작하기"
+             pt-br-lang="Iniciando uma atividade"
+             ru-lang="Запуск операции"
+             zh-cn-lang="开始活动"
+             zh-tw-lang="啟動應用行為顯示">
+            Starting an Activity
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/basics/activity-lifecycle/pausing.html">
+            Pausing and Resuming an Activity
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/basics/activity-lifecycle/stopping.html"
+             ja-lang="アクティビティの一時停止と再開"
+             ko-lang="액티비티 일시정지 및 재개하기"
+             pt-br-lang="Pausando e reiniciando uma atividade"
+             ru-lang="Приостановка и возобновление операции"
+             zh-cn-lang="暂停和继续活动"
+             zh-tw-lang="暫停並繼續應用行為顯示">
+            Stopping and Restarting an Activity
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/basics/activity-lifecycle/recreating.html"
+             ja-lang="アクティビティを再作成する"
+             ko-lang="액티비티 재생성하기"
+             pt-br-lang="Recriando uma atividade"
+             ru-lang="Воссоздание операции"
+             zh-cn-lang="重新创建活动"
+             zh-tw-lang="重新建立應用行為顯示">
+            Recreating an Activity
+          </a>
+          </li>
+        </ul>
+      </li>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/basics/fragments/index.html"
+             description=
+             "How to build a user interface for your app that is flexible enough
+             to present multiple UI components on large screens and a more constrained set of
+             UI components on smaller screens&mdash;essential for building a single APK for both
+             phones and tablets."
+            >Building a Dynamic UI with Fragments</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/basics/fragments/creating.html">
+            Creating a Fragment
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/basics/fragments/fragment-ui.html" zh-cn-lang="构建灵活的界面">
+            Building a Flexible UI
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/basics/fragments/communicating.html">
+            Communicating with Other Fragments
+          </a>
+          </li>
+        </ul>
+      </li>
+
+      <li class="nav-section">
+        <div class="nav-section-header"><a href="<?cs var:toroot?>training/basics/data-storage/index.html"
+             ja-lang="データの保存"
+             ko-lang="데이터 저장하기"
+             pt-br-lang="Salvando dados"
+             ru-lang="Сохранение данных"
+             zh-cn-lang="保存数据"
+             zh-tw-lang="儲存資料"
+             description=
+             "How to save data on the device, whether it's temporary files, downloaded
+             app assets, user media, structured data, or something else."
+            >Saving Data</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/basics/data-storage/shared-preferences.html"
+             ja-lang="キー値セットを保存する"
+             ko-lang="키-값 세트 저장하기"
+             pt-br-lang="Salvando conjuntos de valor-chave"
+             ru-lang="Сохранение наборов "\"ключ-значение\""
+             zh-cn-lang="保存键值集"
+             zh-tw-lang="儲存索引鍵值組">
+            Saving Key-Value Sets
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/basics/data-storage/files.html"
+             ja-lang="ファイルを保存する"
+             ko-lang="파일 저장하기"
+             pt-br-lang="Salvando arquivos"
+             ru-lang="Сохранение файлов"
+             zh-cn-lang="保存文件"
+             zh-tw-lang="儲存檔案">
+            Saving Files
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/basics/data-storage/databases.html"
+             ja-lang="SQL データベースにデータを保存する"
+             ko-lang="SQL 데이터베이스에 데이터 저장하기"
+             pt-br-lang="Salvando dados em bancos de dados do SQL"
+             ru-lang="Сохранение данных в базах данных SQL"
+             zh-cn-lang="在 SQL 数据库中保存数据"
+             zh-tw-lang="在 SQL 資料庫中儲存資料">
+            Saving Data in SQL Databases
+          </a>
+          </li>
+        </ul>
+      </li>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/basics/intents/index.html"
+             ja-lang="他のアプリとの相互操作"
+             ko-lang="액티비티 수명 주기 관리하기"
+             pt-br-lang="Interagindo com outros aplicativos"
+             ru-lang="Взаимодействие с другими приложениями"
+             zh-cn-lang="与其他应用交互"
+             zh-tw-lang="與其他應用程式互動"
+             description=
+             "How to build a user experience that leverages other apps available
+             on the device to perform advanced user tasks, such as capture a photo or view
+             an address on a map."
+            >Interacting with Other Apps</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/basics/intents/sending.html"
+             ja-lang="別のアプリにユーザーを送る"
+             ko-lang="다른 앱으로 사용자 보내기"
+             pt-br-lang="Enviando o usuário para outro aplicativo"
+             ru-lang="Направление пользователя в другое приложение"
+             zh-cn-lang="向另一个应用发送用户"
+             zh-tw-lang="將使用者傳送至其他應用程式">
+            Sending the User to Another App
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/basics/intents/result.html"
+             ja-lang="アクティビティから結果を取得する"
+             ko-lang="액티비티로부터 결과 가져오기"
+             pt-br-lang="Obtendo resultados de uma atividade"
+             ru-lang="Получение результата операции"
+             zh-cn-lang="获取活动的结果"
+             zh-tw-lang="從應用行為顯示取得結果">
+            Getting a Result from the Activity
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/basics/intents/filters.html"
+             ja-lang="他のアプリからのアクティビティの開始を許可する"
+             ko-lang="다른 앱이 자신의 액티비티를 시작하도록 허용하기"
+             pt-br-lang="Permitindo que outros aplicativos iniciem sua atividade"
+             ru-lang="Разрешение другим приложениям на запуск вашей операции"
+             zh-cn-lang="允许其他应用开始您的活动"
+             zh-tw-lang="允許其他應用程式啟動您的應用行為顯示">
+            Allowing Other Apps to Start Your Activity
+          </a>
+          </li>
+        </ul>
+      </li>
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/permissions/index.html"
+             description=
+             "How to declare that your app needs access to features and
+             resources outside of its 'sandbox', and how to request those
+             privileges at runtime."
+            >Working with System Permissions</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/permissions/declaring.html">
+            Declaring Permissions
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/permissions/requesting.html">
+            Requesting Permissions at Run Time
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/permissions/best-practices.html">
+            Best Practices for Runtime Permissions
+          </a>
+          </li>
+        </ul>
+      </li>
+
+    </ul>
+  </li><!-- end getting started -->
+    <li class="nav-section">
+        <div class="nav-section-header">
+            <a href="<?cs var:toroot ?>training/building-content-sharing.html">
+            <span class="small">Building Apps with</span><br/>Content Sharing
+            </a>
+        </div>
+        <ul>
+            <li class="nav-section">
+                <div class="nav-section-header">
+                    <a href="<?cs var:toroot ?>training/sharing/index.html"
+                    description=
+                    "How to take your app interaction to the next level by sharing
+                    information with other apps, receive information back, and provide a simple and
+                    scalable way to perform Share actions with user content."
+                    >Sharing Simple Data</a>
+                </div>
+                <ul>
+                    <li>
+                        <a href="<?cs var:toroot ?>training/sharing/send.html">
+                        Sending Simple Data to Other Apps
+                        </a>
+                    </li>
+                    <li>
+                        <a href="<?cs var:toroot ?>training/sharing/receive.html">
+                        Receiving Simple Data from Other Apps
+                        </a>
+                    </li>
+                    <li>
+                        <a href="<?cs var:toroot ?>training/sharing/shareaction.html">
+                        Adding an Easy Share Action
+                        </a>
+                    </li>
+                </ul>
+            </li>
+            <li class="nav-section">
+                <div class="nav-section-header">
+                    <a href="<?cs var:toroot?>training/secure-file-sharing/index.html"
+                    description=
+                    "How to provide secure access to a file associated with your app using a content
+                    URI and temporary access permissions."
+                    >Sharing Files</a>
+                </div>
+                <ul>
+                    <li>
+                        <a href="<?cs var:toroot ?>training/secure-file-sharing/setup-sharing.html">
+                        Setting Up File Sharing
+                        </a>
+                    </li>
+                    <li>
+                        <a href="<?cs var:toroot ?>training/secure-file-sharing/share-file.html">
+                        Sharing a File
+                        </a>
+                    </li>
+                    <li>
+                        <a href="<?cs var:toroot ?>training/secure-file-sharing/request-file.html">
+                        Requesting a Shared File
+                        </a>
+                    </li>
+                    <li>
+                        <a href="<?cs var:toroot ?>training/secure-file-sharing/retrieve-info.html">
+                        Retrieving File Information
+                        </a>
+                    </li>
+                </ul>
+            </li>
+            <li class="nav-section">
+                <div class="nav-section-header">
+                    <a href="<?cs var:toroot ?>training/beam-files/index.html"
+                    description=
+                    "How to transfer files between devices using the NFC Android Beam feature."
+                    >Sharing Files with NFC</a>
+                </div>
+                <ul>
+                    <li>
+                        <a href="<?cs var:toroot ?>training/beam-files/send-files.html"
+                        >Sending Files to Another Device</a>
+                    </li>
+                    <li><a href="<?cs var:toroot ?>training/beam-files/receive-files.html"
+                    >Receiving Files from Another Device</a></li>
+                </ul>
+            </li>
+        </ul>
+    </li>
+
+
+
+  <li class="nav-section">
+    <div class="nav-section-header">
+      <a href="<?cs var:toroot ?>training/building-multimedia.html">
+      <span class="small">Building Apps with</span><br/>Multimedia
+      </a>
+    </div>
+    <ul>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/managing-audio/index.html"
+             description=
+             "How to respond to hardware audio key presses, request audio focus
+             when playing audio, and respond appropriately to changes in audio focus."
+            >Managing Audio Playback</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/managing-audio/volume-playback.html">
+            Controlling Your App's Volume and Playback
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/managing-audio/audio-focus.html">
+            Managing Audio Focus
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/managing-audio/audio-output.html">
+            Dealing with Audio Output Hardware
+          </a>
+          </li>
+        </ul>
+      </li>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/camera/index.html"
+             description=
+             "How to leverage existing camera apps on the user's device to capture
+             photos or control the camera hardware directly and build your own camera app."
+            >Capturing Photos</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/camera/photobasics.html">
+            Taking Photos Simply
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/camera/videobasics.html">
+            Recording Videos Simply
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/camera/cameradirect.html">
+            Controlling the Camera
+          </a>
+          </li>
+        </ul>
+      </li>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/printing/index.html"
+             description=
+             "How to print photos, HTML documents, and custom documents from your app."
+            >Printing Content</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/printing/photos.html">
+            Photos
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/printing/html-docs.html">
+            HTML Documents
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/printing/custom-docs.html">
+            Custom Documents
+          </a>
+          </li>
+        </ul>
+      </li>
+
+    </ul>
+  </li>
+  <!-- End multimedia -->
+
+
+
+  <li class="nav-section">
+    <div class="nav-section-header">
+      <a href="<?cs var:toroot ?>training/building-graphics.html">
+      <span class="small">Building Apps with</span><br/>Graphics &amp; Animation
+      </a>
+    </div>
+    <ul>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/displaying-bitmaps/index.html"
+             description=
+             "How to load and process bitmaps while keeping your user interface
+             responsive and avoid exceeding memory limits."
+            >Displaying Bitmaps Efficiently</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/displaying-bitmaps/load-bitmap.html">
+            Loading Large Bitmaps Efficiently
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/displaying-bitmaps/process-bitmap.html">
+            Processing Bitmaps Off the UI Thread
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/displaying-bitmaps/cache-bitmap.html">
+            Caching Bitmaps
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/displaying-bitmaps/manage-memory.html">
+            Managing Bitmap Memory
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/displaying-bitmaps/display-bitmap.html">
+            Displaying Bitmaps in Your UI
+          </a></li>
+        </ul>
+      </li>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot?>training/graphics/opengl/index.html"
+             description=
+             "How to create OpenGL graphics within the Android app framework
+             and respond to touch input."
+            >Displaying Graphics with OpenGL ES</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/graphics/opengl/environment.html">
+            Building an OpenGL ES Environment
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/graphics/opengl/shapes.html">
+            Defining Shapes
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/graphics/opengl/draw.html">
+            Drawing Shapes
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/graphics/opengl/projection.html">
+            Applying Projection and Camera Views
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/graphics/opengl/motion.html">
+            Adding Motion
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/graphics/opengl/touch.html">
+            Responding to Touch Events
+          </a>
+          </li>
+        </ul>
+      </li>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot?>training/transitions/index.html"
+             description=
+             "How to animate state changes in a view hierarchy using transitions."
+            >Animating Views Using Scenes and Transitions</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/transitions/overview.html">
+            The Transitions Framework
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/transitions/scenes.html">
+            Creating a Scene
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/transitions/transitions.html">
+            Applying a Transition
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/transitions/custom-transitions.html">
+            Creating Custom Transitions
+          </a>
+          </li>
+
+        </ul>
+      </li>
+
+      <li class="nav-section">
+        <div class="nav-section-header"><a href="<?cs var:toroot ?>training/animation/index.html"
+             description=
+             "How to add transitional animations to your user interface.">
+            Adding Animations
+          </a></div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/animation/crossfade.html">
+            Crossfading Two Views
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/animation/screen-slide.html">
+            Using ViewPager for Screen Slide
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/animation/cardflip.html">
+            Displaying Card Flip Animations
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/animation/zoom.html">
+            Zooming a View
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/animation/layout.html">
+            Animating Layout Changes
+          </a>
+          </li>
+        </ul>
+      </li>
+    </ul>
+  </li>
+  <!-- End graphics and animation -->
+
+
+  <li class="nav-section">
+    <div class="nav-section-header">
+      <a href="<?cs var:toroot ?>training/building-connectivity.html">
+      <span class="small">Building Apps with</span><br/>
+              Connectivity &amp; the Cloud
+      </a>
+    </div>
+    <ul>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/connect-devices-wirelessly/index.html"
+             description=
+             "How to find and connect to local devices using Network Service
+             Discovery and how to create peer-to-peer connections with Wi-Fi."
+             >Connecting Devices Wirelessly</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/connect-devices-wirelessly/nsd.html">
+            Using Network Service Discovery
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/connect-devices-wirelessly/wifi-direct.html">
+            Creating P2P Connections with Wi-Fi
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/connect-devices-wirelessly/nsd-wifi-direct.html">
+            Using Wi-Fi P2P for Service Discovery
+          </a>
+          </li>
+        </ul>
+      </li>
+       <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/basics/network-ops/index.html"
+             description=
+             "How to create a network connection, monitor the connection for changes
+             in connectivity, and perform transactions with XML data."
+            >Performing Network Operations</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/basics/network-ops/connecting.html">
+            Connecting to the Network
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/basics/network-ops/managing.html">
+            Managing Network Usage
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/basics/network-ops/xml.html">
+            Parsing XML Data
+          </a>
+          </li>
+        </ul>
+      </li>
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/efficient-downloads/index.html"
+             description=
+             "How to minimize your app's impact on the battery when performing downloads
+             and other network transactions."
+            >Transferring Data Without Draining the Battery</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/efficient-downloads/efficient-network-access.html">
+            Optimizing Downloads for Efficient Network Access
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/efficient-downloads/regular_updates.html">
+            Minimizing the Effect of Regular Updates
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/efficient-downloads/redundant_redundant.html">
+            Redundant Downloads are Redundant
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/efficient-downloads/connectivity_patterns.html">
+            Modifying Patterns Based on the Connectivity Type
+          </a>
+          </li>
+        </ul>
+      </li>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/backup/index.html"
+             description=
+             "How to sync and back up app and user data to remote web services in the
+              cloud and how to restore the data back to multiple devices."
+            >Syncing to the Cloud</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/backup/autosyncapi.html">
+            Configuring Auto Backup
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/backup/backupapi.html">
+            Using the Backup API
+          </a>
+          </li>
+        </ul>
+        <li><a href="<?cs var:toroot ?>training/cloudsave/conflict-res.html"
+           description=
+           "How to design a robust conflict resolution strategy for apps that save data to the cloud."
+           >Resolving Cloud Save Conflicts
+          </a>
+        </li>
+      </li>
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/sync-adapters/index.html"
+             description="How to transfer data between the cloud and the device using the Android
+             sync adapter framework"
+             >Transferring Data Using Sync Adapters</a>
+        </div>
+        <ul>
+            <li>
+                <a href="<?cs var:toroot ?>training/sync-adapters/creating-authenticator.html">
+                Creating a Stub Authenticator
+                </a>
+            </li>
+            <li>
+                <a href="<?cs var:toroot ?>training/sync-adapters/creating-stub-provider.html">
+                Creating a Stub Content Provider
+                </a>
+            </li>
+            <li>
+                <a href="<?cs var:toroot ?>training/sync-adapters/creating-sync-adapter.html">
+                Creating a Sync Adapter
+                </a>
+            </li>
+            <li>
+                <a href="<?cs var:toroot ?>training/sync-adapters/running-sync-adapter.html">
+                Running a Sync Adapter
+                </a>
+            </li>
+        </ul>
+      </li>
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/volley/index.html"
+             description="How to perform fast, scalable UI operations over the network using Volley"
+             >Transmitting Network Data Using Volley</a>
+        </div>
+        <ul>
+            <li>
+                <a href="<?cs var:toroot ?>training/volley/simple.html">
+                Sending a Simple Request
+                </a>
+            </li>
+            <li>
+                <a href="<?cs var:toroot ?>training/volley/requestqueue.html">
+                Setting Up a RequestQueue
+                </a>
+            </li>
+            <li>
+                <a href="<?cs var:toroot ?>training/volley/request.html">
+                Making a Standard Request
+                </a>
+            </li>
+            <li>
+                <a href="<?cs var:toroot ?>training/volley/request-custom.html">
+                Implementing a Custom Request
+                </a>
+            </li>
+        </ul>
+      </li>
+    </ul>
+  </li>
+  <!-- End connectivity and cloud -->
+
+
+  <li class="nav-section">
+    <div class="nav-section-header">
+      <a href="<?cs var:toroot ?>training/building-location.html">
+      <span class="small">Building Apps with</span><br/>
+              Location &amp; Maps
+      </a>
+    </div>
+    <ul>
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/location/index.html"
+             description="How to add location-aware features to your app by getting the user's current location.">
+             Making Your App Location-Aware
+          </a>
+        </div>
+        <ul>
+          <li>
+            <a href="<?cs var:toroot ?>training/location/retrieve-current.html">
+            Getting the Last Known Location
+            </a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/location/change-location-settings.html">
+            Changing Location Settings
+            </a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/location/receive-location-updates.html">
+            Receiving Location Updates
+            </a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/location/display-address.html">
+            Displaying a Location Address
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/location/geofencing.html">
+            Creating and Monitoring Geofences
+          </a>
+          </li>
+        </ul>
+      </li>
+      <li class="nav-section">
+        <a href="<?cs var:toroot ?>training/maps/index.html"
+           description="How to add maps and mapping information to your app.">
+           Adding Maps
+        </a>
+      </li>
+    </ul>
+  </li>
+  <!-- End location and maps -->
+
+
+  <li class="nav-section">
+    <div class="nav-section-header">
+      <a href="<?cs var:toroot ?>training/building-userinfo.html">
+      <span class="small">Building Apps with</span><br/>
+              User Info &amp; Sign-In
+      </a>
+    </div>
+    <ul>
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/contacts-provider/index.html"
+             description=
+             "How to use Android's central address book, the Contacts Provider, to
+             display contacts and their details and modify contact information.">
+          Accessing Contacts Data</a>
+        </div>
+        <ul>
+          <li>
+                <a href="<?cs var:toroot ?>training/contacts-provider/retrieve-names.html">
+                Retrieving a List of Contacts
+                </a>
+          </li>
+          <li>
+                <a href="<?cs var:toroot ?>training/contacts-provider/retrieve-details.html">
+                Retrieving Details for a Contact
+                </a>
+          </li>
+          <li>
+                <a href="<?cs var:toroot ?>training/contacts-provider/modify-data.html">
+                Modifying Contacts Using Intents
+                </a>
+          </li>
+          <li>
+                <a href="<?cs var:toroot ?>training/contacts-provider/display-contact-badge.html">
+                Displaying the Quick Contact Badge
+                </a>
+          </li>
+        </ul>
+      </li>
+      <li class="nav-section">
+        <a href="<?cs var:toroot ?>training/sign-in/index.html"
+           description="How to add user sign-in functionality to your app.">
+           Adding Sign-In
+        </a>
+      </li>
+    </ul>
+  </li>
+  <!-- End user info and sign-in -->
+
+
+  <li class="nav-section">
+    <div class="nav-section-header">
+      <a href="<?cs var:toroot ?>training/building-wearables.html">
+      <span class="small">Building Apps for</span><br/>
+              Wearables
+      </a>
+    </div>
+    <ul>
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/wearables/notifications/index.html"
+             description="How to build handheld notifications that are synced to
+             and look great on wearables."
+            >Adding Wearable Features to Notifications</a>
+        </div>
+        <ul>
+          <li>
+            <a href="<?cs var:toroot ?>training/wearables/notifications/creating.html">Creating a Notification</a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/wearables/notifications/voice-input.html">Receiving Voice Input in a Notification</a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/wearables/notifications/pages.html">Adding Pages to a Notification</a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/wearables/notifications/stacks.html">Stacking Notifications</a>
+          </li>
+        </ul>
+      </li>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/wearables/apps/index.html"
+             description="How to build apps that run directly on wearables."
+            >Creating Wearable Apps</a>
+        </div>
+        <ul>
+          <li>
+            <a href="<?cs var:toroot ?>training/wearables/apps/creating.html">Creating and Running a Wearable App</a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/wearables/apps/layouts.html">Creating Custom Layouts</a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/wearables/apps/always-on.html">Keeping Your App Visible</a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/wearables/apps/voice.html">Adding Voice Capabilities</a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/wearables/apps/packaging.html">Packaging Wearable Apps</a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/wearables/apps/bt-debugging.html">Debugging over Bluetooth</a>
+          </li>
+        </ul>
+      </li>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/wearables/ui/index.html"
+             description="How to create custom user interfaces for wearable apps."
+            >Creating Custom UIs</a>
+        </div>
+        <ul>
+          <li>
+            <a href="<?cs var:toroot ?>training/wearables/ui/layouts.html">Defining Layouts</a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/wearables/ui/cards.html">Creating Cards</a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/wearables/ui/lists.html">Creating Lists</a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/wearables/ui/2d-picker.html">Creating a 2D Picker</a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/wearables/ui/confirm.html">Showing Confirmations</a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/wearables/ui/exit.html">Exiting Full-Screen Activities</a>
+          </li>
+        </ul>
+      </li>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/wearables/data-layer/index.html"
+             description="How to sync data between handhelds and wearables."
+            >Sending and Syncing Data</a>
+        </div>
+        <ul>
+          <li>
+            <a href="<?cs var:toroot ?>training/wearables/data-layer/accessing.html">Accessing the Wearable Data Layer</a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/wearables/data-layer/data-items.html">Syncing Data Items</a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/wearables/data-layer/assets.html">Transferring Assets</a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/wearables/data-layer/messages.html">Sending and Receiving Messages</a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/wearables/data-layer/events.html">Handling Data Layer Events</a>
+          </li>
+        </ul>
+      </li>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/wearables/watch-faces/index.html"
+             description="How to create watch faces for wearables."
+            >Creating Watch Faces</a>
+        </div>
+        <ul>
+          <li>
+            <a href="<?cs var:toroot ?>training/wearables/watch-faces/designing.html">Designing Watch Faces</a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/wearables/watch-faces/service.html">Building a Watch Face Service</a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/wearables/watch-faces/drawing.html">Drawing Watch Faces</a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/wearables/watch-faces/information.html">Showing Information in Watch Faces</a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/wearables/watch-faces/interacting.html">Creating Interactive Watch Faces</a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/wearables/watch-faces/configuration.html">Providing Configuration Activities</a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/wearables/watch-faces/issues.html">Addressing Common Issues</a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/wearables/watch-faces/performance.html">Optimizing Performance and Battery Life</a>
+          </li>
+        </ul>
+      </li>
+
+      <li>
+        <a href="<?cs var:toroot ?>training/articles/wear-location-detection.html"
+           description=
+           "How to detect location data on Android Wear devices."
+          >Detecting Location</a>
+      </li>
+
+      <li>
+        <a href="<?cs var:toroot ?>training/articles/wear-permissions.html"
+           description=
+           "How to request permissions on Android Wear devices."
+          >Requesting Permissions</a>
+      </li>
+
+      <li>
+        <a href="<?cs var:toroot ?>training/wearables/wearable-sounds.html"
+           description=
+           "How to use the speaker on Android Wear devices."
+          >Using the Speaker</a>
+      </li>
+
+    </ul>
+  </li>
+  <!-- End Building for wearables -->
+
+
+  <!-- Start: Building for TV -->
+  <li class="nav-section">
+    <div class="nav-section-header">
+      <a href="<?cs var:toroot ?>training/tv/index.html">
+      <span class="small">Building Apps for</span><br/>
+              TV
+      </a>
+    </div>
+    <ul>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+
+          <a href="<?cs var:toroot ?>training/tv/start/index.html"
+             ja-lang="TV アプリのビルド"
+             description="How to start building TV apps or extend your existing app to run on TV
+             devices.">
+             Building TV Apps</a>
+        </div>
+        <ul>
+          <li>
+            <a href="<?cs var:toroot ?>training/tv/start/start.html"
+               ja-lang="TV アプリのビルドを開始する">
+              Getting Started with TV Apps</a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/tv/start/hardware.html"
+               ja-lang="TV ハードウェアを処理する">
+              Handling TV Hardware</a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/tv/start/layouts.html"
+               ja-lang="TV 向けレイアウトをビルドする">
+              Building TV Layouts</a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/tv/start/navigation.html"
+               ja-lang="TV 用のナビゲーションを作成する">
+              Creating TV Navigation</a>
+          </li>
+        </ul>
+      </li>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/tv/playback/index.html"
+             ja-lang="TV 再生アプリのビルド"
+             description="How to build apps that provide media catalogs and play content.">
+             Building TV Playback Apps</a>
+        </div>
+        <ul>
+          <li>
+            <a href="<?cs var:toroot ?>training/tv/playback/browse.html"
+               ja-lang="カタログ ブラウザを作成する">
+              Creating a Catalog Browser</a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/tv/playback/card.html">
+              Providing a Card View</a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/tv/playback/details.html"
+               ja-lang="詳細ビューをビルドする">
+              Building a Details View</a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/tv/playback/now-playing.html"
+               ja-lang="再生中カードを表示する">
+              Displaying a Now Playing Card</a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/tv/playback/guided-step.html">
+              Adding a Guided Step</a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/tv/playback/options.html">
+              Enabling Background Playback</a>
+          </li>
+        </ul>
+      </li>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/tv/discovery/index.html"
+             description="How to help users discover content from your app.">
+             Helping Users Find Content on TV</a>
+        </div>
+        <ul>
+          <li>
+            <a href="<?cs var:toroot ?>training/tv/discovery/recommendations.html">
+              Recommending TV Content</a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/tv/discovery/searchable.html">
+              Making TV Apps Searchable</a>
+          <li>
+            <a href="<?cs var:toroot ?>training/tv/discovery/in-app-search.html">
+              Searching within TV Apps</a>
+          </li>
+        </ul>
+      </li>
+
+      <li>
+        <a href="<?cs var:toroot ?>training/tv/games/index.html"
+           description="How to build games for TV.">
+           Building TV Games</a>
+      </li>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/tv/tif/index.html"
+           description="How to build channels for TV.">
+           Building TV Channels</a>
+        </div>
+        <ul>
+          <li>
+            <a href="<?cs var:toroot ?>training/tv/tif/tvinput.html">
+              Developing a TV Input Service</a>
+          <li>
+            <a href="<?cs var:toroot ?>training/tv/tif/channel.html">
+              Working with Channel Data</a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/tv/tif/ui.html">
+              Managing User Interaction</a>
+          </li>
+        </ul>
+      </li>
+
+      <li>
+        <a href="<?cs var:toroot ?>training/tv/publishing/checklist.html"
+           description="An itemized list of requirements for TV apps.">
+           TV Apps Checklist</a>
+      </li>
+    </ul>
+  </li>
+  <!-- End: Building for TV -->
+
+
+  <!-- Start: Building for Auto -->
+  <li class="nav-section">
+    <div class="nav-section-header">
+      <a href="<?cs var:toroot ?>training/auto/index.html">
+      <span class="small">Building Apps for</span><br/>
+              Auto
+      </a>
+    </div>
+    <ul>
+      <li>
+        <a href="<?cs var:toroot ?>training/auto/start/index.html"
+             description="How to start building or extending apps that work
+             with Auto devices.">
+             Getting Started with Auto</a>
+      </li>
+      <li>
+        <a href="<?cs var:toroot ?>training/auto/audio/index.html"
+             description="How to extend audio apps to play content on Auto devices.">
+             Playing Audio for Auto</a>
+      </li>
+      <li>
+        <a href="<?cs var:toroot ?>training/auto/messaging/index.html"
+             description="How to extend text messaging apps to work with Auto devices.">
+             Messaging for Auto</a>
+      </li>
+    </ul>
+  </li>
+  <!-- End: Building for Auto -->
+
+
+  <!-- Start: Building for Work -->
+  <li class="nav-section">
+    <div class="nav-section-header">
+      <a href="<?cs var:toroot ?>training/enterprise/index.html">
+      <span class="small">Building Apps for</span><br/>
+              Work
+      </a>
+    </div>
+    <ul>
+      <li><a href="<?cs var:toroot ?>training/enterprise/app-compatibility.html">
+        Ensuring Compatibility with Managed Profiles
+      </a>
+      </li>
+      <li><a href="<?cs var:toroot ?>training/enterprise/app-restrictions.html">
+        Implementing App Restrictions
+      </a>
+      </li>
+      <li><a href="<?cs var:toroot ?>training/enterprise/work-policy-ctrl.html">
+        Building a Device Policy Controller
+      </a>
+      </li>
+      <li><a href="<?cs var:toroot ?>training/enterprise/cosu.html">
+        Configuring Corporate-Owned, Single-Use Devices
+      </a>
+      </li>
+    </ul>
+  </li>
+  <!-- End: Building for Work -->
+
+
+  <li class="nav-section">
+    <div class="nav-section-header">
+      <a href="<?cs var:toroot ?>training/best-ux.html">
+      <span class="small">Best Practices for</span><br/>
+              Interaction &amp; Engagement
+      </a>
+    </div>
+    <ul>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/design-navigation/index.html"
+             description=
+             "How to plan your app's screen hierarchy and forms of navigation so users can
+             effectively and intuitively traverse your app content using various navigation
+             patterns."
+            >Designing Effective Navigation</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/design-navigation/screen-planning.html">
+            Planning Screens and Their Relationships
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/design-navigation/multiple-sizes.html">
+            Planning for Multiple Touchscreen Sizes
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/design-navigation/descendant-lateral.html">
+            Providing Descendant and Lateral Navigation
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/design-navigation/ancestral-temporal.html">
+            Providing Ancestral and Temporal Navigation
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/design-navigation/wireframing.html">
+            Putting it All Together: Wireframing the Example App
+          </a>
+          </li>
+        </ul>
+      </li>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/implementing-navigation/index.html"
+             description=
+             "How to implement various navigation patterns such as swipe views,
+             a navigation drawer, and up navigation."
+            >Implementing Effective Navigation</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/implementing-navigation/lateral.html">
+            Creating Swipe Views with Tabs
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/implementing-navigation/nav-drawer.html">
+            Creating a Navigation Drawer
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/implementing-navigation/ancestral.html">
+            Providing Up Navigation
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/implementing-navigation/temporal.html">
+            Providing Proper Back Navigation
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/implementing-navigation/descendant.html">
+            Implementing Descendant Navigation
+          </a>
+          </li>
+        </ul>
+      </li>
+
+      <li class="nav-section">
+          <div class="nav-section-header">
+              <a href="<?cs var:toroot ?>training/notify-user/index.html"
+                 description=
+                 "How to display messages called notifications outside of
+                 your application's UI."
+               >Notifying the User</a>
+          </div>
+          <ul>
+              <li>
+                  <a href="<?cs var:toroot ?>training/notify-user/build-notification.html">
+                  Building a Notification
+                  </a>
+              </li>
+              <li>
+                  <a href="<?cs var:toroot ?>training/notify-user/navigation.html">
+                  Preserving Navigation when Starting an Activity
+                  </a>
+              </li>
+              <li>
+                  <a href="<?cs var:toroot ?>training/notify-user/managing.html">
+                  Updating Notifications
+                  </a>
+              </li>
+              <li>
+                  <a href="<?cs var:toroot ?>training/notify-user/expanded.html">
+                  Using Big View Styles
+                  </a>
+              </li>
+              <li>
+                  <a href="<?cs var:toroot ?>training/notify-user/display-progress.html">
+                  Displaying Progress in a Notification
+                  </a>
+              </li>
+          </ul>
+      </li>
+
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+            <a href="<?cs var:toroot ?>training/swipe/index.html"
+            description=
+            "How to modify your app's layout to support manual content updates triggered by the
+             swipe-to-refresh gesture."
+            >Supporting Swipe-to-Refresh</a>
+        </div>
+        <ul>
+            <li>
+                <a href="<?cs var:toroot ?>training/swipe/add-swipe-interface.html"
+                >Adding Swipe-to-Refresh To Your App</a></li>
+            <li>
+                <a href="<?cs var:toroot ?>training/swipe/respond-refresh-request.html"
+                >Responding to a Refresh Gesture</a>
+            </li>
+        </ul>
+      </li>
+
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/search/index.html"
+             description=
+             "How to properly add a search interface to your app and create a searchable database."
+            >Adding Search Functionality</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/search/setup.html">
+            Setting up the Search Interface
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/search/search.html">
+            Storing and Searching for Data
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/search/backward-compat.html">
+            Remaining Backward Compatible
+          </a>
+          </li>
+        </ul>
+      </li>
+
+     <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/app-indexing/index.html"
+             description=
+             "How to enable deep linking and indexing of your application
+content so that users can open this content directly from their mobile search
+results."
+            >Making Your App Content Searchable by Google</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/app-indexing/deep-linking.html">
+            Enabling Deep Links for App Content
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/app-indexing/enabling-app-indexing.html">
+            Specifying App Content for Indexing
+          </a>
+          </li>
+        </ul>
+  </li>
+
+      <li>
+        <a href="<?cs var:toroot ?>training/articles/assistant.html"
+           description=
+           "Support contextually relevant actions through the Assist API."
+          >Optimizing Content for the Assistant</a>
+      </li>
+       <li class="nav-section">
+        <div class="nav-section">
+          <a href="<?cs var:toroot ?>training/app-links/index.html"
+             description=
+             "How to enable the system to handle web requests by taking the user directly
+             to your app instead of your website."
+            >Handling App Links</a>
+        </div>
+      </li>
+  <!-- End Interaction and Engagement -->
+
+</ul>
+
+  <li class="nav-section">
+    <div class="nav-section-header">
+      <a href="<?cs var:toroot ?>training/best-ui.html">
+      <span class="small">Best Practices for</span><br/>
+              User Interface
+      </a>
+    </div>
+    <ul>
+
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/multiscreen/index.html"
+             zh-cn-lang="针对多种屏幕进行设计"
+             ja-lang="複数画面のデザイン"
+             es-lang="Cómo diseñar aplicaciones para varias pantallas"
+             description=
+             "How to build a user interface that's flexible enough to
+             fit perfectly on any screen and how to create different interaction
+             patterns that are optimized for different screen sizes."
+            >Designing for Multiple Screens</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/multiscreen/screensizes.html"
+            zh-cn-lang="支持各种屏幕尺寸"
+            ko-lang="다양한 화면 크기 지원"
+            ja-lang="さまざまな画面サイズのサポート"
+            es-lang="Cómo admitir varios tamaños de pantalla"
+            >Supporting Different Screen Sizes</a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/multiscreen/screendensities.html"
+            zh-cn-lang="支持各种屏幕密度"
+            ja-lang="さまざまな画面密度のサポート"
+            es-lang="Cómo admitir varias densidades de pantalla"
+            >Supporting Different Screen Densities</a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/multiscreen/adaptui.html"
+            zh-cn-lang="实施自适应用户界面流程"
+            ja-lang="順応性のある UI フローの実装"
+            es-lang="Cómo implementar interfaces de usuario adaptables"
+            >Implementing Adaptive UI Flows</a>
+          </li>
+        </ul>
+      </li>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/appbar/index.html"
+             description=
+             "How to use the support library's toolbar widget to implement an
+             app bar that displays properly on a wide range of devices."
+            >Adding the App Bar</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/appbar/setting-up.html"
+            >Setting Up the App Bar</a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/appbar/actions.html"
+            >Adding and Handling Actions</a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/appbar/up-action.html"
+            >Adding an Up Action</a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/appbar/action-views.html"
+            >Action Views and Action Providers</a>
+          </li>
+        </ul>
+      </li>
+
+            <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/snackbar/index.html"
+             description=
+             "How to use the support library's Snackbar widget to display a
+             brief pop-up message."
+            >Showing Pop-Up Messages</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/snackbar/showing.html"
+            >Building and Displaying a Pop-Up Message</a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/snackbar/action.html"
+            >Adding an Action to a Message</a>
+          </li>
+        </ul>
+      </li>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/custom-views/index.html"
+             description=
+             "How to build custom UI widgets that are interactive and smooth."
+            >Creating Custom Views</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/custom-views/create-view.html">
+            Creating a Custom View Class
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/custom-views/custom-drawing.html">
+            Implementing Custom Drawing
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/custom-views/making-interactive.html">
+            Making the View Interactive
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/custom-views/optimizing-view.html">
+            Optimizing the View
+          </a>
+          </li>
+        </ul>
+      </li>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/backward-compatible-ui/index.html"
+             description=
+             "How to use UI components and other APIs from the more recent versions of Android
+             while remaining compatible with older versions of the platform."
+            >Creating Backward-Compatible UIs</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/backward-compatible-ui/abstracting.html">
+            Abstracting the New APIs
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/backward-compatible-ui/new-implementation.html">
+            Proxying to the New APIs
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/backward-compatible-ui/older-implementation.html">
+            Creating an Implementation with Older APIs
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/backward-compatible-ui/using-component.html">
+            Using the Version-Aware Component
+          </a>
+          </li>
+        </ul>
+      </li>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/accessibility/index.html"
+             description=
+             "How to make your app accessible to users with vision
+             impairment or other physical disabilities."
+            >Implementing Accessibility</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/accessibility/accessible-app.html">
+            Developing Accessible Applications
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/accessibility/service.html">
+            Developing Accessibility Services
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/accessibility/testing.html">
+            Accessibility Testing Checklist
+          </a>
+          </li>
+        </ul>
+      </li>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/system-ui/index.html"
+             description=
+             "How to hide and show status and navigation bars across different versions of Android,
+              while managing the display of other screen components."
+            >Managing the System UI</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/system-ui/dim.html">
+            Dimming the System Bars
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/system-ui/status.html">
+            Hiding the Status Bar
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/system-ui/navigation.html">
+            Hiding the Navigation Bar
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/system-ui/immersive.html">
+            Using Immersive Full-Screen Mode
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/system-ui/visibility.html">
+            Responding to UI Visibility Changes
+          </a>
+          </li>
+        </ul>
+      </li>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/material/index.html"
+             description=
+             "How to implement material design on Android."
+            zh-cn-lang="面向开发者的材料设计"
+            zh-tw-lang="開發人員材料設計"
+            ja-lang="マテリアル デザインでのアプリ作成"
+            es-lang="Crear aplicaciones con Material Design"
+            pt-br-lang="Material Design para desenvolvedores"
+            ko-lang="개발자를 위한 머티리얼 디자인"
+            ru-lang="Создание приложений с помощью Material Design"
+            in-lang="Desain Bahan untuk Pengembang"
+            vi-lang="Material Design cho Nhà phát triển"
+            >Creating Apps with Material Design</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/material/get-started.html"
+            zh-cn-lang="入门指南"
+            zh-tw-lang="開始使用"
+            ja-lang="スタート ガイド"
+            es-lang="Comencemos"
+            pt-br-lang="Como iniciar"
+            ko-lang="시작하기"
+            ru-lang="Начало работы"
+            in-lang="Memulai"
+            vi-lang="Bắt đầu"
+            >
+            Getting Started
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/material/theme.html"
+            zh-cn-lang="使用材料主题"
+            zh-tw-lang="使用材料設計風格"
+            ja-lang="マテリアル テーマの使用"
+            es-lang="Usar el tema Material"
+            pt-br-lang="Como usar o tema do Material"
+            ko-lang="머티어리얼 테마 사용"
+            ru-lang="Использование темы Material Design"
+            in-lang="Menggunakan Tema Bahan"
+            vi-lang="Sử dụng Chủ đề Material"
+            >
+            Using the Material Theme
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/material/lists-cards.html"
+            zh-cn-lang="创建列表与卡片"
+            zh-tw-lang="建立清單和卡片"
+            ja-lang="リストとカードの作成"
+            es-lang="Crear listas y tarjetas"
+            pt-br-lang="Como criar listas e cartões"
+            ko-lang="목록 및 카드 생성"
+            ru-lang="Создание списков и подсказок"
+            in-lang="Membuat Daftar dan Kartu"
+            vi-lang="Tạo Danh sách và Thẻ"
+            >
+            Creating Lists and Cards
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/material/shadows-clipping.html"
+            zh-cn-lang="定义阴影与裁剪视图"
+            zh-tw-lang="定義陰影和裁剪檢視"
+            ja-lang="シャドウとクリッピング ビューの定義"
+            es-lang="Definir vistas de recorte y sombras"
+            pt-br-lang="Como definir sombras e recortar visualizações"
+            ko-lang="그림자 정의 및 뷰 클리핑"
+            ru-lang="Определение теней и обрезка представлений"
+            in-lang="Mendefinisikan Bayangan dan Memangkas Tampilan"
+            vi-lang="Định nghĩa Đổ bóng và Dạng xem Cắt hình"
+            >
+            Defining Shadows and Clipping Views
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/material/drawables.html"
+            zh-cn-lang="使用 Drawables"
+            zh-tw-lang="使用可繪項目"
+            ja-lang="ドローアブルの使用"
+            es-lang="Trabajar con interfaces dibujables"
+            pt-br-lang="Como trabalhar com desenháveis"
+            ko-lang="Drawable 사용"
+            ru-lang="Работа с элементами дизайна"
+            in-lang="Bekerja dengan Drawable"
+            vi-lang="Làm việc với Nội dung vẽ được"
+            >
+            Working with Drawables
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/material/animations.html"
+            zh-cn-lang="定义定制动画"
+            zh-tw-lang="定義自訂動畫"
+            ja-lang="カスタム アニメーションの定義"
+            es-lang="Definir animaciones personalizadas"
+            pt-br-lang="Como definir animações personalizadas"
+            ko-lang="사용자지정 애니메이션 정의"
+            ru-lang="Определение настраиваемой анимации"
+            in-lang="Mendefinisikan Animasi Custom"
+            vi-lang="Định nghĩa Hoạt hình Tùy chỉnh"
+            >
+            Defining Custom Animations
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/material/compatibility.html"
+            zh-cn-lang="维护兼容性"
+            zh-tw-lang="維持相容性"
+            ja-lang="互換性の維持"
+            es-lang="Mantener la compatibilidad"
+            pt-br-lang="Como manter a compatibilidade"
+            ko-lang="호환성 유지"
+            ru-lang="Обеспечение совместимости"
+            in-lang="Mempertahankan Kompatibilitas"
+            vi-lang="Duy trì Tính tương thích"
+            >
+            Maintaining Compatibility
+          </a>
+          </li>
+        </ul>
+      </li>
+
+    </ul>
+  </li>
+  <!-- End User Interface -->
+
+
+
+
+  <li class="nav-section">
+    <div class="nav-section-header">
+      <a href="<?cs var:toroot ?>training/best-user-input.html">
+      <span class="small">Best Practices for</span><br/>
+              User Input
+      </a>
+    </div>
+    <ul>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/gestures/index.html"
+             description=
+             "How to write apps that allow users to interact with the touch screen via touch gestures."
+            >Using Touch Gestures</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/gestures/detector.html">
+            Detecting Common Gestures
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/gestures/movement.html">
+            Tracking Movement
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/gestures/scroll.html">
+            Animating a Scroll Gesture
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/gestures/multi.html">
+            Handling Multi-Touch Gestures
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/gestures/scale.html">
+            Dragging and Scaling
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/gestures/viewgroup.html">
+            Managing Touch Events in a ViewGroup
+          </a>
+          </li>
+        </ul>
+      </li>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/keyboard-input/index.html"
+             description=
+             "How to specify the appearance and behaviors of soft input methods (such
+             as on-screen keyboards) and how to optimize the experience with
+             hardware keyboards."
+            >Handling Keyboard Input</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/keyboard-input/style.html">
+            Specifying the Input Method Type
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/keyboard-input/visibility.html">
+            Handling Input Method Visibility
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/keyboard-input/navigation.html">
+            Supporting Keyboard Navigation
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/keyboard-input/commands.html">
+            Handling Keyboard Actions
+          </a>
+          </li>
+        </ul>
+      </li>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/game-controllers/index.html"
+             description=
+             "How to write apps that support game controllers."
+            >Supporting Game Controllers</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/game-controllers/controller-input.html">
+            Handling Controller Actions
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/game-controllers/compatibility.html">
+            Supporting Controllers Across Android Versions
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/game-controllers/multiple-controllers.html">
+            Supporting Multiple Game Controllers
+          </a>
+          </li>
+        </ul>
+      </li>
+    </ul>
+  </li> <!-- end of User Input -->
+
+  <li class="nav-section">
+    <div class="nav-section-header">
+      <a href="<?cs var:toroot ?>training/best-background.html">
+      <span class="small">Best Practices for</span><br/>
+              Background Jobs
+      </a>
+    </div>
+    <ul>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/run-background-service/index.html"
+             description=
+             "How to improve UI performance and responsiveness by sending work to a
+             Service running in the background"
+            >Running in a Background Service</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/run-background-service/create-service.html">
+            Creating a Background Service
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/run-background-service/send-request.html">
+            Sending Work Requests to the Background Service
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/run-background-service/report-status.html">
+            Reporting Work Status
+          </a>
+          </li>
+        </ul>
+      </li>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/load-data-background/index.html"
+             description="How to use CursorLoader to query data without
+             affecting UI responsiveness."
+            >Loading Data in the Background</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/load-data-background/setup-loader.html">
+            Running a Query with a CursorLoader</a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/load-data-background/handle-results.html">
+            Handling the Results</a>
+          </li>
+        </ul>
+      </li>
+
+       <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/scheduling/index.html"
+             description="How to use repeating alarms and wake locks
+             to run background jobs."
+            >Managing Device Awake State</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/scheduling/wakelock.html">
+            Keeping the Device Awake</a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/scheduling/alarms.html">
+            Scheduling Repeating Alarms</a>
+          </li>
+        </ul>
+      </li>
+    </ul>
+  </li> <!-- end of Background Jobs -->
+
+  <li class="nav-section">
+    <div class="nav-section-header">
+      <a href="<?cs var:toroot ?>training/best-performance.html">
+      <span class="small">Best Practices for</span><br/>
+              Performance
+      </a>
+    </div>
+    <ul>
+      <li>
+        <a href="<?cs var:toroot ?>training/articles/memory.html"
+          description=
+          "How to keep your app's memory footprint small in order to improve performance
+          on a variety of mobile devices."
+          >Managing Your App's Memory</a>
+      </li>
+      <li>
+        <a href="<?cs var:toroot ?>training/articles/perf-tips.html"
+           description=
+           "How to optimize your app's performance in various ways to improve its
+           responsiveness and battery efficiency."
+          >Performance Tips</a>
+      </li>
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/improving-layouts/index.html"
+             description=
+             "How to identify problems in your app's layout performance and improve the UI
+             responsiveness."
+            >Improving Layout Performance</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/improving-layouts/optimizing-layout.html">
+            Optimizing Layout Hierarchies
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/improving-layouts/reusing-layouts.html">
+            Re-using Layouts with &lt;include/&gt;
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/improving-layouts/loading-ondemand.html">
+            Loading Views On Demand
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/improving-layouts/smooth-scrolling.html">
+            Making ListView Scrolling Smooth
+          </a>
+          </li>
+        </ul>
+      </li>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/monitoring-device-state/index.html"
+             zh-cn-lang="优化电池使用时间"
+             ja-lang="電池消費量の最適化"
+             es-lang="Cómo optimizar la duración de la batería"
+             description=
+             "How to minimize the amount of power your app requires by adapting to current
+             power conditions and performing power-hungry tasks at proper intervals."
+            >Optimizing Battery Life
+            </a>
+        </div>
+        <ul>
+
+          <li class="nav-section">
+            <div class="nav-section-header">
+              <a href="<?cs var:toroot ?>training/performance/battery/network/index.html">
+                Reducing Network Battery Drain
+              </a>
+            </div>
+            <ul>
+              <li><a href="<?cs var:toroot ?>training/performance/battery/network/gather-data.html">
+                Collecting Network Traffic Data
+              </a>
+              </li>
+              <li><a href="<?cs var:toroot ?>training/performance/battery/network/analyze-data.html">
+                Analyzing Network Traffic Data
+              </a>
+              </li>
+              <li><a href="<?cs var:toroot ?>training/performance/battery/network/action-user-traffic.html">
+                Optimizing User-Initiated Network Use
+              </a>
+              </li>
+              <li><a href="<?cs var:toroot ?>training/performance/battery/network/action-app-traffic.html">
+                Optimizing App-Initiated Network Use
+              </a>
+              </li>
+              <li><a href="<?cs var:toroot ?>training/performance/battery/network/action-server-traffic.html">
+                Optimizing Server-Initiated Network Use
+              </a>
+              </li>
+              <li><a href="<?cs var:toroot ?>training/performance/battery/network/action-any-traffic.html">
+                Optimizing General Network Use
+              </a>
+              </li>
+            </ul>
+          </li> <!-- End of Reducing Network Battery Drain -->
+
+          <li><a href="<?cs var:toroot ?>training/monitoring-device-state/doze-standby.html"
+            >Optimizing for Doze and App Standby</a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/monitoring-device-state/battery-monitoring.html"
+            zh-cn-lang="监控电池电量和充电状态"
+            ja-lang="電池残量と充電状態の監視"
+            es-lang="Cómo controlar el nivel de batería y el estado de carga"
+            >Monitoring the Battery Level and Charging State</a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/monitoring-device-state/docking-monitoring.html"
+            zh-cn-lang="确定和监控基座对接状态和类型"
+            ja-lang="ホルダーの装着状態とタイプの特定と監視"
+            es-lang="Cómo determinar y controlar el tipo de conector y el estado de la conexión"
+            >Determining and Monitoring the Docking State and Type</a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/monitoring-device-state/connectivity-monitoring.html"
+            zh-cn-lang="确定和监控网络连接状态"
+            ja-lang="接続状態の特定と監視"
+            es-lang="Cómo determinar y controlar el estado de la conectividad"
+            >Determining and Monitoring the Connectivity Status</a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/monitoring-device-state/manifest-receivers.html"
+            zh-cn-lang="根据需要操作广播接收器"
+            ja-lang="オンデマンドでのブロードキャスト レシーバ操作"
+            es-lang="Cómo manipular los receptores de emisión bajo demanda"
+            >Manipulating Broadcast Receivers On Demand</a>
+          </li>
+        </ul>
+      </li>
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/multiple-threads/index.html"
+             description=
+             "How to improve the performance and scalability of long-running operations by
+              dispatching work to multiple threads.">
+             Sending Operations to Multiple Threads</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/multiple-threads/define-runnable.html">
+            Specifying the Code to Run on a Thread
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/multiple-threads/create-threadpool.html">
+            Creating a Manager for Multiple Threads
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/multiple-threads/run-code.html">
+            Running Code on a Thread Pool Thread
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/multiple-threads/communicate-ui.html">
+            Communicating with the UI Thread
+          </a>
+          </li>
+        </ul>
+      </li>
+      <li>
+        <a href="<?cs var:toroot ?>training/articles/perf-anr.html"
+           description=
+           "How to keep your app responsive to user interaction so the UI does not lock-up and
+           display an &quot;Application Not Responding&quot; dialog."
+          >Keeping Your App Responsive</a>
+      </li>
+      <li>
+        <a href="<?cs var:toroot ?>training/articles/perf-jni.html"
+           description=
+           "How to efficiently use the Java Native Interface with the Android NDK."
+          >JNI Tips</a>
+      </li>
+      <li>
+        <a href="<?cs var:toroot ?>training/articles/smp.html"
+           description=
+           "Tips for coding Android apps on symmetric multiprocessor systems."
+          >SMP Primer for Android</a>
+      </li>
+    </ul>
+  </li> <!-- end of Performance -->
+
+  <li class="nav-section">
+    <div class="nav-section-header">
+      <a href="<?cs var:toroot ?>training/best-security.html">
+      <span class="small">Best Practices for</span><br/>
+              Security &amp; Privacy
+      </a>
+    </div>
+    <ul>
+      <li>
+        <a href="<?cs var:toroot ?>training/articles/security-tips.html"
+           description=
+           "How to perform various tasks and keep your app's data and your user's data secure."
+          >Security Tips</a>
+      </li>
+
+      <li>
+        <a href="<?cs var:toroot ?>training/articles/security-ssl.html"
+           description=
+           "How to ensure that your app is secure when performing network transactions."
+          >Security with HTTPS and SSL</a>
+      </li>
+
+      <li>
+        <a href="<?cs var:toroot ?>training/articles/security-gms-provider.html"
+           description=
+           "How to use and update Google Play services security provider, to
+           protect against SSL exploits."
+          >Updating Your Security Provider to Protect Against SSL Exploits</a>
+      </li>
+
+      <li>
+        <a href="<?cs var:toroot ?>training/safetynet/index.html"
+           description=
+           "How to use the SafetyNet service to analyze a device where your app is running
+            and get information about its compatibility with your app."
+          >Checking Device Compatibility with SafetyNet</a>
+      </li>
+
+      <li>
+        <a href="<?cs var:toroot ?>training/enterprise/device-management-policy.html"
+            description="How to create an application that enforces security policies on devices."
+            >Enhancing Security with Device Management Policies</a>
+      </li>
+    </ul>
+  </li>
+  <!-- End security and user info -->
+
+  <li class="nav-section">
+    <div class="nav-section-header">
+      <a href="<?cs var:toroot ?>training/best-permissions-ids.html">
+      <span class="small">Best Practices for</span><br/>
+              Permissions &amp; Identifiers
+      </a>
+    </div>
+    <ul>
+      <li>
+        <a href="<?cs var:toroot ?>training/articles/user-data-overview.html"
+           description=
+           "Overview of app permissions on Android and how they affect your users."
+          >Permissions and User Data</a>
+      </li>
+      <li>
+        <a href="<?cs var:toroot ?>training/articles/user-data-permissions.html"
+           description=
+           "How to manage permissions the right way for users."
+          >Best Practices for App Permissions</a>
+      </li>
+      <li>
+        <a href="<?cs var:toroot ?>training/articles/user-data-ids.html"
+           description=
+           "Unique identifiers available and how to choose the right one for your use case."
+          >Best Practices for Unique Identifiers</a>
+      </li>
+    </ul>
+  </li>
+  <!-- End Permissions and identifiers -->
+
+  <li class="nav-section">
+    <div class="nav-section-header">
+      <a href="<?cs var:toroot ?>training/testing/index.html">
+      <span class="small">Best Practices for</span><br/>
+              Testing
+      </a>
+    </div>
+    <ul>
+      <li>
+      <a href="<?cs var:toroot ?>training/testing/start/index.html"
+         description="How to get started with testing your Android applications.">
+            Getting Started with Testing
+          </a>
+      </li>
+      <li class="nav-section">
+      <div class="nav-section-header"><a href="<?cs var:toroot ?>training/testing/unit-testing/index.html"
+         description="How to build effective unit tests for Android apps.">
+            Building Effective Unit Tests
+          </a></div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/testing/unit-testing/local-unit-tests.html">
+            <span class="en">Building Local Unit Tests</span>
+            </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/testing/unit-testing/instrumented-unit-tests.html">
+            <span class="en">Building Instrumented Unit Tests</span>
+            </a>
+          </li>
+        </ul>
+      </li>
+      <li class="nav-section">
+      <div class="nav-section-header"><a href="<?cs var:toroot ?>training/testing/ui-testing/index.html"
+         description="How to automate your user interface tests for Android apps.">
+            Automating UI Tests
+          </a></div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/testing/ui-testing/espresso-testing.html">
+            <span class="en">Testing UI for a Single App</span>
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/testing/ui-testing/uiautomator-testing.html">
+            <span class="en">Testing UI for Multiple Apps</span>
+          </a>
+          </li>
+        </ul>
+      </li>
+      <li class="nav-section">
+      <div class="nav-section-header"><a href="<?cs var:toroot ?>training/testing/integration-testing/index.html"
+         description="How to build effective integration tests for Android apps.">
+            Testing App Component Integrations
+          </a></div>
+        <ul>
+         <li><a href="<?cs var:toroot ?>training/testing/integration-testing/service-testing.html">
+           <span class="en">Testing Your Service</span></a></li>
+         <li><a href="<?cs var:toroot ?>training/testing/integration-testing/content-provider-testing.html">
+           <span class="en">Testing Your Content Provider</span></a></li>
+        </ul>
+      </li>
+      <li><a href="<?cs var:toroot ?>training/testing/performance.html"
+          description="How to automate UI performance testing.">Testing Display Performance</a>
+      </li>
+    </ul>
+  </li>
+  <!-- End best Testing -->
+
+  <li class="nav-section">
+    <div class="nav-section-header">
+      <a href="<?cs var:toroot ?>training/distribute.html">
+      <span class="small">Using Google Play to</span><br/>
+              Distribute &amp; Monetize
+      </a>
+    </div>
+    <ul>
+      <li class="nav-section">
+      <div class="nav-section-header"><a href="<?cs var:toroot ?>training/in-app-billing/index.html"
+         description="How to sell in-app products from your application using In-app Billing.">
+            Selling In-app Products
+          </a></div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/in-app-billing/preparing-iab-app.html">
+            <span class="en">Preparing Your App</span>
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/in-app-billing/list-iab-products.html">
+            <span class="en">Establishing Products for Sale</span>
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/in-app-billing/purchase-iab-products.html">
+            <span class="en">Purchasing Products</span>
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/in-app-billing/test-iab-app.html">
+            <span class="en">Testing Your App</span>
+          </a>
+          </li>
+        </ul>
+      </li>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/multiple-apks/index.html"
+             description=
+             "How to publish your app on Google Play with separate APKs that target
+             different devices, while using a single app listing."
+            >Maintaining Multiple APKs</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/multiple-apks/api.html">
+            Creating Multiple APKs for Different API Levels
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/multiple-apks/screensize.html">
+            Creating Multiple APKs for Different Screen Sizes
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/multiple-apks/texture.html">
+            Creating Multiple APKs for Different GL Textures
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/multiple-apks/multiple.html">
+            Creating Multiple APKs with 2+ Dimensions
+          </a>
+          </li>
+        </ul>
+      </li>
+    </ul>
+  </li>
+  <!-- End best Publishing -->
+
+</ul><!-- nav -->
+<script type="text/javascript">
+<!--
+    buildToggleLists();
+    changeNavLang(getLangPref());
+//-->
+</script>
diff --git a/docs/html/training/performance/battery/network/action-any-traffic.jd b/docs/html/topic/performance/power/network/action-any-traffic.jd
similarity index 100%
rename from docs/html/training/performance/battery/network/action-any-traffic.jd
rename to docs/html/topic/performance/power/network/action-any-traffic.jd
diff --git a/docs/html/training/performance/battery/network/action-app-traffic.jd b/docs/html/topic/performance/power/network/action-app-traffic.jd
similarity index 100%
rename from docs/html/training/performance/battery/network/action-app-traffic.jd
rename to docs/html/topic/performance/power/network/action-app-traffic.jd
diff --git a/docs/html/training/performance/battery/network/action-server-traffic.jd b/docs/html/topic/performance/power/network/action-server-traffic.jd
similarity index 100%
rename from docs/html/training/performance/battery/network/action-server-traffic.jd
rename to docs/html/topic/performance/power/network/action-server-traffic.jd
diff --git a/docs/html/training/performance/battery/network/action-user-traffic.jd b/docs/html/topic/performance/power/network/action-user-traffic.jd
similarity index 100%
rename from docs/html/training/performance/battery/network/action-user-traffic.jd
rename to docs/html/topic/performance/power/network/action-user-traffic.jd
diff --git a/docs/html/training/performance/battery/network/analyze-data.jd b/docs/html/topic/performance/power/network/analyze-data.jd
similarity index 100%
rename from docs/html/training/performance/battery/network/analyze-data.jd
rename to docs/html/topic/performance/power/network/analyze-data.jd
diff --git a/docs/html/training/performance/battery/network/gather-data.jd b/docs/html/topic/performance/power/network/gather-data.jd
similarity index 100%
rename from docs/html/training/performance/battery/network/gather-data.jd
rename to docs/html/topic/performance/power/network/gather-data.jd
diff --git a/docs/html/training/performance/battery/network/index.jd b/docs/html/topic/performance/power/network/index.jd
similarity index 100%
rename from docs/html/training/performance/battery/network/index.jd
rename to docs/html/topic/performance/power/network/index.jd
diff --git a/docs/html/topic/performance/scheduling.jd b/docs/html/topic/performance/scheduling.jd
new file mode 100644
index 0000000..b6f0fdc
--- /dev/null
+++ b/docs/html/topic/performance/scheduling.jd
@@ -0,0 +1,285 @@
+page.title=Intelligent Job-Scheduling
+@jd:body
+
+<div id="qv-wrapper">
+<div id="qv">
+
+<h2>In this document</h2>
+<ol>
+   <li><a href="#js">Android Framework JobScheduler</a></li>
+   <li><a href="#am">AlarmManager</a></li>
+   <li><a href="#fjd">Firebase JobDispatcher</a></li>
+   <li><a href="#gcmnm">GCM Network Manager</a></li>
+   <li><a href="#af">Additional Facilities</a></li>
+   <ul>
+      <li><a href="#sa">SyncAdapter</a></li>
+      <li><a href="#services">Services</a></li>
+   </ul>
+   <li><a href="#ap">Additional Points</a></li>
+</ol>
+
+</div>
+</div>
+
+<p>
+Modern apps can perform many of their tasks asynchronously, outside the
+direct flow of user interaction. Some examples of these asynchronous tasks are:
+</p>
+
+<ul>
+   <li>Updating network resources.</li>
+   <li>Downloading information.</li>
+   <li>Updating background tasks.</li>
+   <li>Scheduling system service calls.</li>
+</ul>
+
+<p>
+Scheduling this work intelligently can improve your app’s performance,
+along with aspects of system health such as battery life. {@link android.app.job.JobScheduler}
+does this scheduling work for you.
+<p>
+
+<p>
+There are several APIs that your app can use to schedule background work. Chief
+among these options is {@link android.app.job.JobScheduler}.
+The {@link android.app.job.JobScheduler} API allows you to specify robust
+conditions for executing tasks,
+along with centralized task scheduling across the device for optimal
+system health. {@link android.app.job.JobScheduler} also offers highly
+scalable functionality: it is suitable for small tasks like clearing a cache,
+and for large ones such as syncing a database to the cloud.
+<p>
+
+<p>
+In addition to {@link android.app.job.JobScheduler}, there are several other
+facilities available to help your app schedule work. These include:
+</p>
+
+<ul>
+   <li><a href="{@docRoot}reference/android/app/AlarmManager.html">AlarmManager
+   </a></li>
+   <li><a href="https://github.com/firebase/firebase-jobdispatcher-android#user-content-firebase-jobdispatcher-">
+   Firebase JobDispatcher</a></li>
+   <li><a href="https://developers.google.com/cloud-messaging/network-manager">
+   GCM Network Manager</a></li>
+   <li><a href="{@docRoot}reference/android/content/AbstractThreadedSyncAdapter.html">
+   SyncAdapter</a></li>
+   <li><a href="{@docRoot}reference/android/content/AbstractThreadedSyncAdapter.html">
+   Additional Facilities</a></li>
+</ul>
+
+<p>
+This page provides brief introductions to {@link android.app.job.JobScheduler}
+and other APIs that can help your app schedule work to maximize app performance
+and system health.
+</p>
+
+<h2 id="js">Android Framework JobScheduler</h2>
+
+<p>
+{@link android.app.job.JobScheduler} is the Android framework’s native platform
+for scheduling tasks or work. It first became available in Android 5.0 (API
+level 21), and remains under active development. Notably, Android N (API
+level 24) added the ability to trigger jobs based on
+{@link android.content.ContentProvider} changes.
+</p>
+
+<p>
+{@link android.app.job.JobScheduler} is implemented in the platform, which
+allows it to collect information about jobs that need to run across all apps.
+This information is used to schedule jobs to run at, or around, the same time.
+Batching job execution in this fashion allows the device to enter and stay in
+sleep states longer, preserving battery life.
+</p>
+
+<p>
+You use {@link android.app.job.JobScheduler} by registering jobs, specifying
+their requirements for network and timing. The system then gracefully schedules
+the jobs to execute at the appropriate times. At the same time, it also defers
+job execution as necessary to comply with
+<a href="{@docRoot}topic/performance/monitoring-device-state/doze-standby.html">
+Doze and App Standby</a> restrictions.
+{@link android.app.job.JobScheduler} provides many methods to define
+job-execution conditions.
+</p>
+
+<p>
+If your app targets Android 5.0 (API level 21), we recommend that you use the
+{@link android.app.job.JobScheduler} to execute background tasks. For more
+information about {@link android.app.job.JobScheduler}, see its
+<a href="{@docRoot}reference/android/app/job/JobScheduler.html">API-reference
+documentation.</a>
+</p>
+
+<h2 id="am">AlarmManager</h2>
+
+<p>
+The {@link android.app.AlarmManager} API is another option that the framework
+provides for scheduling tasks. This API is useful in cases in which an app
+needs to post a notification or set off an alarm at a very specific time.
+</p>
+
+<p>
+You should only use this API for tasks that must execute at a specific time,
+but do not require the other, more robust, execution conditions that
+{@link android.app.job.JobScheduler} allows you to specify, such as device
+idle and charging detect.
+</p>
+
+<p>
+{@link android.app.AlarmManager} does not honor
+<a href="{@docRoot}topic/performance/monitoring-device-state/doze-standby.html">
+Doze and App Standby</a> restrictions; it runs tasks even during
+<a href="{@docRoot}topic/performance/monitoring-device-state/doze-standby.html">
+Doze or App Standby</a> mode. Additionally,
+an app running during
+<a href="{@docRoot}topic/performance/monitoring-device-state/doze-standby.html">
+Doze or App Standby</a> mode cannot use the network.
+</p>
+
+<h2 id="fjd">Firebase JobDispatcher</h2>
+
+<p>
+<a href="https://github.com/firebase/firebase-jobdispatcher-android#user-content-firebase-jobdispatcher-">
+Firebase JobDispatcher</a> is an open-source library that provides an API similar to
+{@link android.app.job.JobScheduler} in the Android platform.
+<a href="https://github.com/firebase/firebase-jobdispatcher-android#user-content-firebase-jobdispatcher-">
+Firebase JobDispatcher</a> serves as a
+{@link android.app.job.JobScheduler}-compatibility layer for apps targeting
+versions of Android lower than 5.0 (API level 21).
+</p>
+
+<p>
+<a href="https://github.com/firebase/firebase-jobdispatcher-android#user-content-firebase-jobdispatcher-">
+Firebase JobDispatcher</a> supports the use of Google Play services as an
+implementation for dispatching (running) jobs, but the library also allows you
+to define and use other implementations: For example, you might decide to use
+{@link android.app.job.JobScheduler} or write your own, custom code.
+Because of this versatility, we recommend that you use this
+<a href="https://github.com/firebase/firebase-jobdispatcher-android#user-content-firebase-jobdispatcher-">
+Firebase JobDispatcher</a> if your app targets a version of Android lower
+than 5.0 (API level 21).
+</p>
+
+<p>
+For more information about
+<a href="https://github.com/firebase/firebase-jobdispatcher-android#user-content-firebase-jobdispatcher-">
+Firebase JobDispatcher</a>, refer to its
+<a href="https://github.com/firebase/firebase-jobdispatcher-android#user-content-firebase-jobdispatcher-">
+documentation and source code</a>.
+</p>
+
+<h2 id = "gcmnm">GCM Network Manager</h2>
+
+<p>
+<a href="https://developers.google.com/cloud-messaging/network-manager">GCM
+Network Manager</a> is a compatibility port of the Android
+{@link android.app.job.JobScheduler} for apps that support versions of Android
+prior to 5.0 (API level 21). This API has all of the same advantages as
+{@link android.app.job.JobScheduler}. However, it depends on Google Play
+services, which acts like {@link android.app.job.JobScheduler} by taking care
+of cross-app job scheduling to improve battery life. This client library is
+part of the Google Play services GCM client library, but does not require
+that an app use
+<a href="https://developers.google.com/cloud-messaging/">Google Cloud
+Messaging</a>.
+</p>
+
+<p>
+This library is an earlier version of
+<a href="https://github.com/firebase/firebase-jobdispatcher-android#user-content-firebase-jobdispatcher-">
+Firebase JobDispatcher</a>. Forward development on GCM Network Manager has
+stopped; we recommend that you use
+<a href="https://github.com/firebase/firebase-jobdispatcher-android#user-content-firebase-jobdispatcher-">
+Firebase JobDispatcher</a> going forward.
+</p>
+
+<h2 id="af">Additional Facilities</h2>
+
+<p>
+In addition to the APIs and libraries described above, there are also sync
+adapters and services that can enable your app, under specific conditions,
+to perform better and more robustly.
+</p>
+
+<h3 id="sa">SyncAdapter</h3>
+
+<p>
+The framework continues to provide the
+{@link android.content.AbstractThreadedSyncAdapter SyncAdapter} class for
+managing tasks that sync data between the device and a server. Sync adapters are
+designed specifically for syncing data between a device and the cloud; you
+should only use them for this type of task. Sync adapters are more complex to
+implement than the libraries and APIs mentioned above, because they require at
+least a fake
+<a href="{@docRoot}training/sync-adapters/creating-authenticator.html">
+authenticator</a>and
+<a href="{@docRoot}training/sync-adapters/creating-stub-provider.html">
+content provider</a> implementation. For these reasons, you typically should
+not create a sync adapter just to sync data to the cloud in the
+background. Wherever possible, you should instead use
+{@link android.app.job.JobScheduler},
+<a href="https://github.com/firebase/firebase-jobdispatcher-android#user-content-firebase-jobdispatcher-">
+Firebase JobDispatcher</a>, or
+<a href="https://developers.google.com/cloud-messaging/network-manager">GCM
+Network Manager</a> .
+</p>
+
+<p>
+In Android N (API level 24), the {@code SyncManager} sits on top of
+the {@link android.app.job.JobScheduler}. You should only use the
+{@link android.content.AbstractThreadedSyncAdapter SyncAdapter}
+class if you require the additional functionality that it provides.
+</p>
+
+<h3 id="services">Services</h3>
+
+<p>
+The <a href="{@docRoot}guide/components/services.html">Services</a>
+framework allows you to perform long-running operations in the background.
+We recommend foreground services for tasks, such as playing
+music, which need to stay resident for the user. Bound services also continue
+to be useful for various use cases: for example, when a service needs to
+run only when a user is viewing a fragment or activity.
+</p>
+
+<p>
+You should avoid using started services that run perpetually or
+perform periodic work, since they continue to use device resources
+even when they are not performing useful tasks. Instead, you
+should use other solutions that this page describes,
+and that provide native lifecycle management. Use started services
+only as a last resort. The Android platform may not support
+started services in the future.
+</p>
+
+<h2 id="ap">Additional Points</h2>
+
+<p>
+Regardless of the solution you adopt, keep the following points in mind:
+</p>
+
+<ul>
+   <li>Captive Internet Portals, VPNs, and proxies can pose
+   Internet-connectivity detection problems. A library or API may think the
+   Internet is available, but your service may not be accessible. Fail
+   gracefully and reschedule as few of your tasks as possible.</li>
+   <li>Depending on the conditions you assign for running a task, 
+   such as network availability, after the task is triggered, a
+   change may occur so that those conditions are no longer met.
+   In such a case, your operation may fail unexpectedly and repeatedly.
+   For this reason, you
+   should code your background task logic to notice when tasks are failing
+   persistently, and perform exponential back-off to avoid
+   inadvertently over-using resources.</li>
+
+
+
+   <li>Remember to use exponential backoff when rescheduling any work,
+   especially when using {@link android.app.AlarmManager}. If your app uses
+   {@link android.app.job.JobScheduler},
+   <a href="https://developers.google.com/cloud-messaging/network-manager">GCM
+   Network Manager</a>,
+   <a href="https://github.com/firebase/firebase-jobdispatcher-android#user-content-firebase-jobdispatcher-">
+   Firebase JobDispatcher</a>, or sync adapters, exponential backoff is automatically used.</li>
+</ul>
diff --git a/docs/html/training/auto/index.jd b/docs/html/training/auto/index.jd
index 0a7ceb3..a0d0bb8 100644
--- a/docs/html/training/auto/index.jd
+++ b/docs/html/training/auto/index.jd
@@ -8,7 +8,9 @@
 
 @jd:body
 
-<iframe width="448" height="252" src="//www.youtube.com/embed/ctiaVxgclsg?autohide=1&amp;showinfo=0" frameborder="0" allowfullscreen="" style="float: right; margin: 0 0 20px 20px;"></iframe>
+      <iframe width="338" height="169" src="//www.youtube.com/embed/LfVBFFoy9Y0?utm_source=dac&utm_medium=video&utm_content=andfuntrain&utm_campaign=udacint?rel=0&amp;hd=1" frameborder="0" allowfullscreen></iframe>
+      <p><a href="https://www.udacity.com/course/ud853" class="button"
+        style="width:100%">Start the video course</a>
 
 <p>
   The Android platform enables you to extend your app to work with in-vehicle console systems
@@ -27,7 +29,7 @@
   For more information, follow the links below to learn how to extend your Android app to support
   use in vehicles.
 </p>
- 
+
 <h2 id="overview">Get Started</h2>
 
 <p>