From 2d9063bc705aae7ef4cc90206ece03d4caeefba7 Mon Sep 17 00:00:00 2001
From: Scott Main 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: A layout defines the visual structure for a user interface, such as the UI for an activity or app widget.
+You can declare a layout in two ways: 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. To learn more about the available XML elements and attributes, as well as the format of the XML file, see Layout Resources. 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 — with a series of nested elements. 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}:
After you've declared your layout in XML, save the file with the We'll discuss each of the attributes shown here a little later. More information about the syntax for a layout XML file is available in the Layout Resources document.See also
+
+
Write the XML
-.xml extension,
in your Android project's res/layout/ directory, so it will properly compile. Load the XML Resource
diff --git a/docs/html/guide/topics/ui/layout/gridview.jd b/docs/html/guide/topics/ui/layout/gridview.jd
index 11c54740d631..67bdd0f080cf 100644
--- a/docs/html/guide/topics/ui/layout/gridview.jd
+++ b/docs/html/guide/topics/ui/layout/gridview.jd
@@ -22,10 +22,15 @@ two-dimensional,
scrollable grid. The grid items are automatically inserted to the layout using a {@link
android.widget.ListAdapter}.
For an introduction to how you can dynamically insert views using an adapter, read +Building Layouts with + an Adapter.
+
In this tutorial, you'll create a grid of image thumbnails. When an item is selected, a toast message will display the position of the image.
diff --git a/docs/html/guide/topics/ui/layout/listview.jd b/docs/html/guide/topics/ui/layout/listview.jd index 26a75979988d..fee52927e846 100644 --- a/docs/html/guide/topics/ui/layout/listview.jd +++ b/docs/html/guide/topics/ui/layout/listview.jd @@ -28,6 +28,10 @@ scrollable items. The list items are automatically inserted to the list using an android.widget.Adapter} that pulls content from a source such as an array or database query and converts each item result into a view that's placed into the list. +For an introduction to how you can dynamically insert views using an adapter, read +Building Layouts with + an Adapter.
+
<uses-permission android:name="android.permission.READ_CONTACTS" />
+<uses-permission android:name="android.permission.READ_CONTACTS" />
--
cgit v1.2.3-59-g8ed1b