cherry-pick af4786bcb5945f72e8639d74611cd5f9b0236710 to froyo

Conflicts:

	docs/html/sdk/installing.jd

Change-Id: Id43ad8c62039099bb518722bb8694dcf8ba6dfa6
diff --git a/docs/html/resources/community-groups.jd b/docs/html/resources/community-groups.jd
index a36a425..72bdf7a 100644
--- a/docs/html/resources/community-groups.jd
+++ b/docs/html/resources/community-groups.jd
@@ -2,21 +2,27 @@
 page.title=Developer Forums
 @jd:body
 
-<p>Welcome to the Android developers community! We're glad you're here and invite you to participate in discussions with other Android application developers on topics that interest you.</p>
+<div id="qv-wrapper">
+<div id="qv">
 
-<p>The lists on this page are primarily for discussion about Android application development. If you are seeking discussion about Android source code (not application development), then please refer to the <a href="http://source.android.com/discuss">Open Source Project Mailing lists</a>.</p>
-
-<p style="margin-bottom:.5em"><strong>Contents</strong></p>
-<ol class="toc">
-  <li><a href="#StackOverflow">Stack Overflow</a> <span class="new">new!</span></li>
-  <li><a href="#MailingLists">Mailing lists</a><ol>
+  <h2>In this document</h2>
+  <ol>
+  <li><a href="#StackOverflow">Android on Stack Overflow</a></li>
+  <li><a href="#MailingLists">Mailing lists</a>
+  <ol>
     <li><a href="#BeforeYouPost">Before you post</a></li>
     <li><a href="#UsingEmail">Using email with the mailing lists</a></li>
     <li><a href="#ApplicationDeveloperLists">Application developer mailing lists</a></li>
   </ol></li>
   <li><a href="#MarketHelp">Android Market Help Forum</a></li>
-</ol>
+  </ol>
 
+</div>
+</div>
+
+<p>Welcome to the Android developers community! We're glad you're here and invite you to participate in discussions with other Android application developers on topics that interest you.</p>
+
+<p>The lists on this page are primarily for discussion about Android application development. If you are seeking discussion about Android source code (not application development), then please refer to the <a href="http://source.android.com/discuss">Open Source Project Mailing lists</a>.</p>
 
 <h2 id="StackOverflow">Stack Overflow</h2>
 
diff --git a/docs/html/resources/community-more.jd b/docs/html/resources/community-more.jd
index 2be015a..9f16fea 100644
--- a/docs/html/resources/community-more.jd
+++ b/docs/html/resources/community-more.jd
@@ -2,7 +2,7 @@
 page.title=IRC and Twitter
 @jd:body
 
-<p>In addition to the <a href="community-groups.html">Android developer groups</a>, you can also participate in the Android developer community through IRC, and you can also follow us on Twitter. </p>
+<p>In addition to the <a href="community-groups.html">Android developer forums</a>, you can participate in the Android developer community through IRC and you can follow us on Twitter. </p>
 
 <h3 id="irc">IRC</h3>
 
@@ -31,10 +31,10 @@
 <ul>
 <li>Set your nickname before you join the channel.</li>
 <li>Registering your nickname prevents others from using your nickname or impersonating you later:
-<pre>/nick &lt;yournickname&gt;
-/msg nickserv register &lt;password&gt; &lt;email&gt;</code></pre>
+<pre class="no-pretty-print" style="width:50%;">/nick &lt;yournickname&gt;
+/msg nickserv register &lt;password&gt; &lt;email&gt;</pre>
 <p>Afterwards, when you connect, you'll need to supply a password:</p>
-<pre>/connect irc.freenode.net
+<pre class="no-pretty-print" style="width:50%;">/connect irc.freenode.net
 /nick &lt;yournickname&gt;
 /msg nickserv identify &lt;password&gt;
 /join #android-dev</pre>
diff --git a/docs/html/resources/resources_toc.cs b/docs/html/resources/resources_toc.cs
index 0972029..659e08e 100644
--- a/docs/html/resources/resources_toc.cs
+++ b/docs/html/resources/resources_toc.cs
@@ -171,9 +171,12 @@
                <span class="zh-TW" style="display:none"></span>
     </h2>
     <ul>
+      <li><a href="<?cs var:toroot ?>resources/samples/get.html">
+            <span class="en">Getting the Samples</span>
+          </a></li>
       <li class="toggle-list">
         <div><a href="<?cs var:toroot ?>resources/samples/index.html">
-               <span class="en">List of Sample Apps</span>
+               <span class="en">List of Samples</span>
              </a> <span class="new">new!</span></div>
         <ul>
           <li><a href="<?cs var:toroot ?>resources/samples/ApiDemos/index.html">
diff --git a/docs/html/resources/samples/get.jd b/docs/html/resources/samples/get.jd
new file mode 100644
index 0000000..898bc49
--- /dev/null
+++ b/docs/html/resources/samples/get.jd
@@ -0,0 +1,90 @@
+page.title=Getting the Samples
+
+@jd:body
+
+<p>Sometimes, the best way to learn how things are done is to look at some
+code.</p>
+
+<p>To help you get started quickly, the Android SDK includes a variety of sample
+code and tutorials that illustrate key concepts and techniques of Android
+application development. For example, the samples show the structure of the
+manifest file and the use of activities, services, resources,
+intents, content providers, and permissions. They also show how to add
+specialized capabilities to your apps, such as Bluetooth and Contacts
+integration, multiple screens support, Live Wallpaper, and more. </p>
+
+<p>The SDK provides the samples both as source code and as browseable HTML, as
+described in the sections below. All of the samples included in the SDK are
+licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache
+2.0 license</a>, so feel free to use any of the code in your own applications as
+needed!</p>
+
+<h3 id="downloading">Downloading the Sample Code</h3>
+
+<p>The SDK sample code is available to you as a set of downloadable SDK
+components, each of which contains the samples for a specific Android platform
+version. Once you have installed the SDK, you can download one or more samples
+component(s) into your SDK environment using the Android SDK and AVD Manager
+tool, which is pre-installed in the SDK. </p>
+
+<p>To download the samples, launch the Android SDK and AVD Manager tool and
+select one of the samples components from the <strong>Available
+Packages</strong> panel, for example "Samples for SDK API 7". Select
+<strong>Install Selected</strong>, verify and accept the download, then select
+<strong>Install Accepted</strong> to download the component into your SDK. If
+you aren't familiar with the Android SDK and AVD Manager and how to launch or
+use it, please read the <a href="{@docRoot}sdk/adding-components.html">Adding
+SDK Components</a> document. </p>
+
+<p>When the download is complete, you can find the samples sources on your
+computer in this location:</p>
+
+<p style="margin-left:2em">
+<code><em>&lt;sdk&gt;</em>/samples/<em>&lt;platform-version&gt;</em>/</code>
+</p>
+
+<p>You can easily create new Android projects with the downloaded samples, modify them
+if you'd like, and then run them on an emulator or device. </p>
+
+<p>For example, if you are developing in Eclipse with the ADT Plugin, you can
+create a project for the "API Demos" sample app by starting a new Android
+Project, selecting "Create project from existing source", and then browsing to
+the <code><em>&lt;sdk&gt;</em>/samples/<em>&lt;platform&gt;</em>/ApiDemos</code>
+directory (the <code>samples</code> directory for the platform version you are
+using).</p>
+
+<p>If you are not working in Eclipse, you can create a project for the API Demos
+sample using the <code>android</code> tool, by executing this command:</p>
+
+<pre class="no-pretty-print">
+android update project -s -n API Demos -t <em>&lt;target_ID></em> -p <em>&lt;path&gt;</em>samples/<em>&lt;platforms&gt;</em>/ApiDemos/
+</pre>
+
+<h3 id="browsing">Browsing the Sample Code</h3>
+
+<p>For your convenience, the SDK provides browseable source code for the latest
+versions of the samples. You can use your browser to navigate through the
+structure of each sample and look at the source code in each of its files. </p>
+
+<p>To browse the samples, go to the <a
+href="{@docRoot}resources/samples/index.html">List of Sample Apps</a> first.
+From there you can read a short summary of each sample application and what
+types of concepts, features, or APIs it includes. Then, use the links provided
+to move through the directories and files of each sample. The browseable source
+is generated from the same source code that is downloadable through the Android
+SDK and AVD Manager, as described above. </p>
+
+<p>The browseable samples files are available online, at the Android Developers
+site only and are not included in the downloadable offline documentation.
+Note that, although samples for several platform versions are available for 
+download, only the samples for the latest platform version are browseable online.
+</p>
+
+
+<h3 id="more">More Sample Code</h3>
+
+<p>If you are looking for more sample code, check out
+<a href="http://code.google.com/p/apps-for-android/">apps-for-android</a>, a
+collection of open source applications that demonstrate various Android APIs.</p>
+
+
diff --git a/docs/html/resources/samples/index.jd b/docs/html/resources/samples/index.jd
index 5ebf41c..044c69de 100644
--- a/docs/html/resources/samples/index.jd
+++ b/docs/html/resources/samples/index.jd
@@ -1,38 +1,21 @@
-page.title=Sample Code
+page.title=List of Sample Apps
 @jd:body
 
+<p>The list below provides a summary of the sample applications that are 
+available with the Android SDK. Using the links on this page, you can view
+the source files of the sample applications in your browser. </p>
 
-<p>Sometimes, the best way to learn how things are done is to look at some code.</p>
-
-<p>Here, you can browse the source of some sample Android applications. Also, each version of the
-Android platform available for the SDK includes a set of sample
-applications (which may vary between different versions of the platform).
-You can find the samples in your SDK at:</p>
-
-<p style="margin-left:2em">
-<code><em>&lt;sdk&gt;</em>/platforms/android-<em>&lt;version&gt;</em>/samples/</code>
-</p>
-
-<p>You can easily create new Android projects with these samples, modify them
-if you'd like, then run them on an emulator or device. For example, to create
-a project for the API Demos app from Eclipse,
-start a new Android Project, select "Create project from existing source", then select
-{@code ApiDemos} in the {@code samples/} directory. To create the API Demos project
-using the {@code android} tool, execute:</p>
-<pre>
-android update project -s -n API Demos -t <em>&lt;target_ID></em> -p <em>&lt;path-to-platform></em>/samples/ApiDemos/
-</pre>
-
-<p>The pages below provide an overview of each sample application (available with most
-platforms) and allow you to view the source files in your browser. </p>
-
+<p>You can also download the source of these samples into your SDK, then 
+modify and reuse it as you need. For more information, see <a 
+href="{@docRoot}resources/samples/get.html">Getting the Samples</a>.</p>
+<!--
 <div class="special">
   <p>Some of the samples in this listing may not yet be available in the
   SDK. To ensure that you have the latest versions of the samples, you can
   <a href="{@docRoot}shareables/latest_samples.zip">download the samples pack</a>
   as a .zip archive.</p>
 </div>
-
+-->
 <dl>
 
  <dt><a href="ApiDemos/index.html">API Demos</a></dt>