summaryrefslogtreecommitdiffstats
path: root/docs/html/training/basics/firstapp
diff options
context:
space:
mode:
authorScott Main <smain@google.com>2012-06-21 17:14:39 -0700
committerScott Main <smain@google.com>2012-06-21 21:27:30 -0700
commit50e990c64fa23ce94efa76b9e72df7f8ec3cee6a (patch)
tree52605cd25e01763596477956963fabcd087054b0 /docs/html/training/basics/firstapp
parenta2860267cad115659018d636bf9203a644c680a7 (diff)
downloadframeworks_base-50e990c64fa23ce94efa76b9e72df7f8ec3cee6a.zip
frameworks_base-50e990c64fa23ce94efa76b9e72df7f8ec3cee6a.tar.gz
frameworks_base-50e990c64fa23ce94efa76b9e72df7f8ec3cee6a.tar.bz2
Massive clobber of all HTML files in developer docs for new site design
Change-Id: Idc55a0b368c1d2c1e7d4999601b739dd57f08eb3
Diffstat (limited to 'docs/html/training/basics/firstapp')
-rw-r--r--docs/html/training/basics/firstapp/building-ui.jd29
-rw-r--r--docs/html/training/basics/firstapp/creating-project.jd16
-rw-r--r--docs/html/training/basics/firstapp/index.jd2
-rw-r--r--docs/html/training/basics/firstapp/running-app.jd10
-rw-r--r--docs/html/training/basics/firstapp/starting-activity.jd10
5 files changed, 34 insertions, 33 deletions
diff --git a/docs/html/training/basics/firstapp/building-ui.jd b/docs/html/training/basics/firstapp/building-ui.jd
index dae70a2..df8089f 100644
--- a/docs/html/training/basics/firstapp/building-ui.jd
+++ b/docs/html/training/basics/firstapp/building-ui.jd
@@ -19,7 +19,7 @@ next.link=starting-activity.html
<ol>
<li><a href="#LinearLayout">Use a Linear Layout</a></li>
- <li><a href="#TextInput">Add a Text Input Box</a></li>
+ <li><a href="#TextInput">Add a Text Field</a></li>
<li><a href="#Strings">Add String Resources</a></li>
<li><a href="#Button">Add a Button</a></li>
<li><a href="#Weight">Make the Input Box Fill in the Screen Width</a></li>
@@ -61,7 +61,7 @@ Hardware</a>.</p>
</div>
</div>
-<img src="{@docRoot}images/viewgroup.png" alt="" />
+<img src="{@docRoot}images/viewgroup.png" alt="" width="440" />
<p class="img-caption"><strong>Figure 1.</strong> Illustration of how {@link
android.view.ViewGroup} objects form branches in the layout and contain {@link
android.view.View} objects.</p>
@@ -130,12 +130,12 @@ href="{@docRoot}guide/topics/ui/declaring-layout.html">XML Layout</a> guide.</p>
-<h2 id="TextInput">Add a Text Input Box</h2>
+<h2 id="TextInput">Add a Text Field</h2>
-<p>To create a user-editable text box, add an {@link android.widget.EditText
+<p>To create a user-editable text field, add an {@link android.widget.EditText
&lt;EditText>} element inside the {@link android.widget.LinearLayout &lt;LinearLayout>}. The {@link
android.widget.EditText} class is a subclass of {@link android.view.View} that displays an editable
-text box.</p>
+text field.</p>
<p>Like every {@link android.view.View} object, you must define certain XML attributes to specify
the {@link android.widget.EditText} object's properties. Here’s how you should declare it
@@ -185,7 +185,8 @@ first time. It tells the SDK tools that the resource ID needs to be created. Thu
compiled, the SDK tools use the ID value, <code>edit_message</code>, to create a new identifier in
your project's {@code gen/R.java} file that is now assiciated with the {@link
android.widget.EditText} element. Once the resource ID is created, other references to the ID do not
-need the plus symbol. See the sidebox for more information about resource objects.</p></dd>
+need the plus symbol. This is the only attribute that may need the plus-symbol. See the sidebox for
+more information about resource objects.</p></dd>
<dt><a
href="{@docRoot}reference/android/view/View.html#attr_android:layout_width">{@code
@@ -202,12 +203,12 @@ href="{@docRoot}guide/topics/ui/declaring-layout.html">XML Layouts</a> guide.</d
<dt><a
href="{@docRoot}reference/android/widget/TextView.html#attr_android:hint">{@code
android:hint}</a></dt>
-<dd>This is a default string to display when the text box is empty. Instead of using a hard-coded
-string as the value, the value given in this example refers to a string resource. When you add the
-{@code
-"@string/edit_message"} value, you’ll see a compiler error because there’s no matching string
-resource by that name. You'll fix this in the next section by defining the string
-resource.</dd>
+<dd>This is a default string to display when the text field is empty. Instead of using a hard-coded
+string as the value, the {@code "@string/edit_message"} value refers to a string resource defined
+in a separate file. Because this value refers to an existing resource, it does not need the
+plus-symbol. However, because you haven't defined the string resource yet, you’ll see a compiler
+error when you add the {@code "@string/edit_message"} value. You'll fix this in the next section by
+defining the string resource.</dd>
</dl>
@@ -276,9 +277,9 @@ figure 2.</p>
android.widget.Button} widgets have their widths set to
<code>"wrap_content"</code>.</p>
-<p>This works fine for the button, but not as well for the text box, because the user might type
+<p>This works fine for the button, but not as well for the text field, because the user might type
something longer and there's extra space left on the screen. So, it'd be nice to fill that width
-using the text box.
+using the text field.
{@link android.widget.LinearLayout} enables such a design with the <em>weight</em> property, which
you can specify using the <a
href="{@docRoot}reference/android/widget/LinearLayout.LayoutParams.html#weight">{@code
diff --git a/docs/html/training/basics/firstapp/creating-project.jd b/docs/html/training/basics/firstapp/creating-project.jd
index 5a89f2e..4fbfe34 100644
--- a/docs/html/training/basics/firstapp/creating-project.jd
+++ b/docs/html/training/basics/firstapp/creating-project.jd
@@ -23,9 +23,9 @@ next.link=running-app.html
<h2>You should also read</h2>
<ul>
- <li><a href="{@docRoot}sdk/installing.html">Installing the
+ <li><a href="{@docRoot}sdk/installing/index.html">Installing the
SDK</a></li>
- <li><a href="{@docRoot}guide/developing/projects/index.html">Managing Projects</a></li>
+ <li><a href="{@docRoot}tools/projects/index.html">Managing Projects</a></li>
</ul>
@@ -42,8 +42,8 @@ SDK tools from a command line.</p>
<p class="note"><strong>Note:</strong> You should already have the Android SDK installed, and if
you're using Eclipse, you should have installed the <a
-href="{@docRoot}sdk/eclipse-adt.html">ADT plugin</a> as well. If you have not installed
-these, see <a href="{@docRoot}sdk/installing.html">Installing the Android SDK</a> and return here
+href="{@docRoot}tools/sdk/eclipse-adt.html">ADT plugin</a> as well. If you have not installed
+these, see <a href="{@docRoot}sdk/installing/index.html">Installing the Android SDK</a> and return here
when you've completed the installation.</p>
@@ -59,7 +59,7 @@ when you've completed the installation.</p>
The resulting dialog should have a folder labeled <em>Android</em>. (If you don’t see the
<em>Android</em> folder,
then you have not installed the ADT plugin&mdash;see <a
-href="{@docRoot}sdk/eclipse-adt.html#installing">Installing the ADT Plugin</a>).</li>
+href="{@docRoot}tools/sdk/eclipse-adt.html#installing">Installing the ADT Plugin</a>).</li>
<li>Open the <em>Android</em> folder, select <em>Android Project</em> and click
<strong>Next</strong>.</li>
<li>Enter a project name (such as "MyFirstApp") and click <strong>Next</strong>.</li>
@@ -68,7 +68,7 @@ href="{@docRoot}sdk/eclipse-adt.html#installing">Installing the ADT Plugin</a>).
support older versions, but setting the build target to the latest version allows you to
easily optimize your app for a great user experience on the latest Android-powered devices.</p>
<p>If you don't see any built targets listed, you need to install some using the Android SDK
-Manager tool. See <a href="{@docRoot}sdk/installing.html#AddingComponents">step 4 in the
+Manager tool. See <a href="{@docRoot}sdk/installing/index.html#AddingComponents">step 4 in the
installing guide</a>.</p>
<p>Click <strong>Next</strong>.</p></li>
<li>Specify other app details, such as the:
@@ -87,7 +87,7 @@ app (an activity represents a single screen in your app). Enter "MyFirstActivity
<li><em>Minimum SDK</em>: Select <em>4 (Android 1.6)</em>.
<p>Because this version is lower than the build target selected for the app, a warning
appears, but that's alright. You simply need to be sure that you don't use any APIs that require an
-<a href="{@docRoot}guide/appendix/api-levels.html">API level</a> greater than the minimum SDK
+<a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#ApiLevels">API level</a> greater than the minimum SDK
version without first using some code to verify the device's system version (you'll see this in some
other classes).</p>
</li>
@@ -117,7 +117,7 @@ support older versions, but setting the build target to the latest version allow
your app for the latest devices.</p>
<p>If you don't see any targets listed, you need to
install some using the Android SDK
-Manager tool. See <a href="{@docRoot}sdk/installing.html#AddingComponents">step 4 in the
+Manager tool. See <a href="{@docRoot}sdk/installing/index.html#AddingComponents">step 4 in the
installing guide</a>.</p></li>
<li>Execute:
<pre class="no-pretty-print">
diff --git a/docs/html/training/basics/firstapp/index.jd b/docs/html/training/basics/firstapp/index.jd
index 9ff5b18..43b289b 100644
--- a/docs/html/training/basics/firstapp/index.jd
+++ b/docs/html/training/basics/firstapp/index.jd
@@ -35,7 +35,7 @@ to:</p>
<li>Download the latest SDK tools and platforms using the SDK Manager.</li>
</ol>
-<p>If you haven't already done this setup, read <a href="{@docRoot}sdk/installing.html">Installing
+<p>If you haven't already done this setup, read <a href="{@docRoot}sdk/installing/index.html">Installing
the SDK</a>. Once you've finished the setup, you're ready to begin this class.</p>
<p>This class uses a tutorial format that incrementally builds a small Android app in order to teach
diff --git a/docs/html/training/basics/firstapp/running-app.jd b/docs/html/training/basics/firstapp/running-app.jd
index 43b8983..5105a3b 100644
--- a/docs/html/training/basics/firstapp/running-app.jd
+++ b/docs/html/training/basics/firstapp/running-app.jd
@@ -25,9 +25,9 @@ next.link=building-ui.html
<h2>You should also read</h2>
<ul>
- <li><a href="{@docRoot}guide/developing/device.html">Using Hardware Devices</a></li>
- <li><a href="{@docRoot}guide/developing/devices/index.html">Managing Virtual Devices</a></li>
- <li><a href="{@docRoot}guide/developing/projects/index.html">Managing Projects</a></li>
+ <li><a href="{@docRoot}tools/device.html">Using Hardware Devices</a></li>
+ <li><a href="{@docRoot}tools/devices/index.html">Managing Virtual Devices</a></li>
+ <li><a href="{@docRoot}tools/projects/index.html">Managing Projects</a></li>
</ul>
@@ -85,7 +85,7 @@ the app.</p>
<ol>
<li>Plug in your Android-powered device to your machine with a USB cable.
If you’re developing on Windows, you might need to install the appropriate USB driver for your
-device. For help installing drivers, see the <a href=”{@docRoot}sdk/oem-usb.html”>OEM USB
+device. For help installing drivers, see the <a href="{@docRoot}tools/extras/oem-usb.html">OEM USB
Drivers</a> document.</li>
<li>Ensure that <strong>USB debugging</strong> is enabled in the device Settings (open Settings
and navitage to <strong>Applications > Development</strong> on most devices, or select
@@ -116,7 +116,7 @@ lesson</a>.</p>
<h2 id="Emulator">Run on the Emulator</h2>
<p>Whether you’re using Eclipse or the command line, you need to first create an <a
-href="{@docRoot}guide/developing/devices/index.html">Android Virtual
+href="{@docRoot}tools/devices/index.html">Android Virtual
Device</a> (AVD). An AVD is a
device configuration for the Android emulator that allows you to model
different device configurations.</p>
diff --git a/docs/html/training/basics/firstapp/starting-activity.jd b/docs/html/training/basics/firstapp/starting-activity.jd
index c548c1d..a8d32b6 100644
--- a/docs/html/training/basics/firstapp/starting-activity.jd
+++ b/docs/html/training/basics/firstapp/starting-activity.jd
@@ -31,7 +31,7 @@ previous.link=building-ui.html
<h2>You should also read</h2>
<ul>
- <li><a href="{@docRoot}sdk/installing.html">Installing the
+ <li><a href="{@docRoot}sdk/installing/index.html">Installing the
SDK</a></li>
</ul>
@@ -42,7 +42,7 @@ SDK</a></li>
<p>After completing the <a href="building-ui.html">previous lesson</a>, you have an app that
-shows an activity (a single screen) with a text box and a button. In this lesson, you’ll add some
+shows an activity (a single screen) with a text field and a button. In this lesson, you’ll add some
code to <code>MyFirstActivity</code> that
starts a new activity when the user selects the Send button.</p>
@@ -90,7 +90,7 @@ the signature must be exactly as shown. Specifically, the method must:</p>
android.view.View} that was clicked)</li>
</ul>
-<p>Next, you’ll fill in this method to read the contents of the text box and deliver that text to
+<p>Next, you’ll fill in this method to read the contents of the text field and deliver that text to
another activity.</p>
@@ -290,8 +290,8 @@ public void onCreate(Bundle savedInstanceState) {
}
</pre>
-<p>You can now run the app, type a message in the text box, press Send, and view the message on the
-second activity.</p>
+<p>You can now run the app, type a message in the text field, press Send, and view the message on
+the second activity.</p>
<img src="{@docRoot}images/training/firstapp/firstapp.png" />
<p class="img-caption"><strong>Figure 1.</strong> Both activities in the final app, running