Skip to content

Commit 2d9063b

Browse files
committed
docs: Add a few links and small edits to a couple layout guides
Change-Id: I4c0c043782524a29f7fb8fcb54cc26d7399c39fc
1 parent 9047e46 commit 2d9063b

File tree

3 files changed

+21
-16
lines changed

3 files changed

+21
-16
lines changed

docs/html/guide/topics/ui/declaring-layout.jd

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,17 @@ parent.link=index.html
3232
<li>{@link android.view.ViewGroup}</li>
3333
<li>{@link android.view.ViewGroup.LayoutParams}</li>
3434
</ol>
35-
</div>
35+
36+
<h2>See also</h2>
37+
<ol>
38+
<li><a href="{@docRoot}training/basics/firstapp/building-ui.html">Building a Simple User
39+
Interface</a></li> </div>
3640
</div>
3741

38-
<p>Your layout is the architecture for the user interface in an Activity.
39-
It defines the layout structure and holds all the elements that appear to the user.
40-
You can declare your layout in two ways:</p>
42+
<p>A layout defines the visual structure for a user interface, such as the UI for an <a
43+
href="{@docRoot}guide/components/activities.html">activity</a> or <a
44+
href="{@docRoot}guide/topics/appwidgets/index.html">app widget</a>.
45+
You can declare a layout in two ways:</p>
4146
<ul>
4247
<li><strong>Declare UI elements in XML</strong>. Android provides a straightforward XML
4348
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
7782

7883
<h2 id="write">Write the XML</h2>
7984

80-
<div class="sidebox-wrapper">
81-
<div class="sidebox">
82-
<p>For your convenience, the API reference documentation for UI related classes
83-
lists the available XML attributes that correspond to the class methods, including inherited
84-
attributes.</p>
85-
<p>To learn more about the available XML elements and attributes, as well as the format of the XML file, see <a
86-
href="{@docRoot}guide/topics/resources/available-resources.html#layoutresources">Layout Resources</a>.</p>
87-
</div>
88-
</div>
89-
9085
<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>
9186

9287
<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}:</
111106
<p>After you've declared your layout in XML, save the file with the <code>.xml</code> extension,
112107
in your Android project's <code>res/layout/</code> directory, so it will properly compile. </p>
113108

114-
<p>We'll discuss each of the attributes shown here a little later.</p>
109+
<p>More information about the syntax for a layout XML file is available in the <a
110+
href="{@docRoot}guide/topics/resources/layout-resource.html">Layout Resources</a> document.</p>
115111

116112
<h2 id="load">Load the XML Resource</h2>
117113

docs/html/guide/topics/ui/layout/gridview.jd

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,15 @@ two-dimensional,
2222
scrollable grid. The grid items are automatically inserted to the layout using a {@link
2323
android.widget.ListAdapter}.</p>
2424

25+
<p>For an introduction to how you can dynamically insert views using an adapter, read
26+
<a href="{@docRoot}guide/topics/ui/declaring-layout.html#AdapterViews">Building Layouts with
27+
an Adapter</a>.</p>
28+
2529
<img src="{@docRoot}images/ui/gridview.png" alt="" />
2630

2731

2832
<h2 id="example">Example</h2>
33+
2934
<p>In this tutorial, you'll create a grid of image thumbnails. When an item is selected, a
3035
toast message will display the position of the image.</p>
3136

docs/html/guide/topics/ui/layout/listview.jd

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ scrollable items. The list items are automatically inserted to the list using an
2828
android.widget.Adapter} that pulls content from a source such as an array or database query and
2929
converts each item result into a view that's placed into the list.</p>
3030

31+
<p>For an introduction to how you can dynamically insert views using an adapter, read
32+
<a href="{@docRoot}guide/topics/ui/declaring-layout.html#AdapterViews">Building Layouts with
33+
an Adapter</a>.</p>
34+
3135
<img src="{@docRoot}images/ui/listview.png" alt="" />
3236

3337
<h2 id="Loader">Using a Loader</h2>
@@ -147,5 +151,5 @@ href="{@docRoot}guide/topics/providers/contacts-provider.html">Contacts
147151
Provider</a>, if you want to
148152
try this code, your app must request the {@link android.Manifest.permission#READ_CONTACTS}
149153
permission in the manifest file:<br/>
150-
<code>&lt;uses-permission android:name="android.permission.READ_CONTACTS" /></p>
154+
<code>&lt;uses-permission android:name="android.permission.READ_CONTACTS" /></code></p>
151155

0 commit comments

Comments
 (0)