summaryrefslogtreecommitdiffstats
path: root/docs/html/guide/topics/ui/declaring-layout.jd
diff options
context:
space:
mode:
Diffstat (limited to 'docs/html/guide/topics/ui/declaring-layout.jd')
-rw-r--r--docs/html/guide/topics/ui/declaring-layout.jd30
1 files changed, 13 insertions, 17 deletions
diff --git a/docs/html/guide/topics/ui/declaring-layout.jd b/docs/html/guide/topics/ui/declaring-layout.jd
index 3c9faa8..e229f23 100644
--- a/docs/html/guide/topics/ui/declaring-layout.jd
+++ b/docs/html/guide/topics/ui/declaring-layout.jd
@@ -32,12 +32,17 @@ parent.link=index.html
<li>{@link android.view.ViewGroup}</li>
<li>{@link android.view.ViewGroup.LayoutParams}</li>
</ol>
-</div>
+
+ <h2>See also</h2>
+ <ol>
+ <li><a href="{@docRoot}training/basics/firstapp/building-ui.html">Building a Simple User
+Interface</a></li> </div>
</div>
-<p>Your layout is the architecture for the user interface in an Activity.
-It defines the layout structure and holds all the elements that appear to the user.
-You can declare your layout in two ways:</p>
+<p>A layout defines the visual structure for a user interface, such as the UI for an <a
+href="{@docRoot}guide/components/activities.html">activity</a> or <a
+href="{@docRoot}guide/topics/appwidgets/index.html">app widget</a>.
+You can declare a layout in two ways:</p>
<ul>
<li><strong>Declare UI elements in XML</strong>. Android provides a straightforward XML
vocabulary that corresponds to the View classes and subclasses, such as those for widgets and layouts.</li>
@@ -77,16 +82,6 @@ Layout Objects</a>. There are also a collection of tutorials on building various
<h2 id="write">Write the XML</h2>
-<div class="sidebox-wrapper">
-<div class="sidebox">
-<p>For your convenience, the API reference documentation for UI related classes
-lists the available XML attributes that correspond to the class methods, including inherited
-attributes.</p>
-<p>To learn more about the available XML elements and attributes, as well as the format of the XML file, see <a
-href="{@docRoot}guide/topics/resources/available-resources.html#layoutresources">Layout Resources</a>.</p>
-</div>
-</div>
-
<p>Using Android's XML vocabulary, you can quickly design UI layouts and the screen elements they contain, in the same way you create web pages in HTML &mdash; with a series of nested elements. </p>
<p>Each layout file must contain exactly one root element, which must be a View or ViewGroup object. Once you've defined the root element, you can add additional layout objects or widgets as child elements to gradually build a View hierarchy that defines your layout. For example, here's an XML layout that uses a vertical {@link android.widget.LinearLayout}
@@ -111,7 +106,8 @@ to hold a {@link android.widget.TextView} and a {@link android.widget.Button}:</
<p>After you've declared your layout in XML, save the file with the <code>.xml</code> extension,
in your Android project's <code>res/layout/</code> directory, so it will properly compile. </p>
-<p>We'll discuss each of the attributes shown here a little later.</p>
+<p>More information about the syntax for a layout XML file is available in the <a
+href="{@docRoot}guide/topics/resources/layout-resource.html">Layout Resources</a> document.</p>
<h2 id="load">Load the XML Resource</h2>
@@ -406,13 +402,13 @@ into a view that can be added into the {@link android.widget.AdapterView} layout
<div class="layout first">
<h4><a href="layout/listview.html">List View</a></h4>
- <a href="layout/list.html"><img src="{@docRoot}images/ui/listview-small.png" alt="" /></a>
+ <a href="layout/listview.html"><img src="{@docRoot}images/ui/listview-small.png" alt="" /></a>
<p>Displays a scrolling single column list.</p>
</div>
<div class="layout">
<h4><a href="layout/gridview.html">Grid View</a></h4>
- <a href="layout/grid.html"><img src="{@docRoot}images/ui/gridview-small.png" alt="" /></a>
+ <a href="layout/gridview.html"><img src="{@docRoot}images/ui/gridview-small.png" alt="" /></a>
<p>Displays a scrolling grid of columns and rows.</p>
</div>