From d3161450fb6bd461575f0e93fadacea73cc9c51c Mon Sep 17 00:00:00 2001 From: David Friedman Date: Fri, 18 Jul 2014 02:28:54 -0700 Subject: Minor typos, consistency things, one grammatical error. Change-Id: I65ad160b9c49bc9c7e762d3628e69c518742ef4c --- docs/html/guide/topics/ui/declaring-layout.jd | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'docs/html/guide/topics/ui') diff --git a/docs/html/guide/topics/ui/declaring-layout.jd b/docs/html/guide/topics/ui/declaring-layout.jd index 40ae81e..c08128b 100644 --- a/docs/html/guide/topics/ui/declaring-layout.jd +++ b/docs/html/guide/topics/ui/declaring-layout.jd @@ -71,7 +71,7 @@ application can create View and ViewGroup objects (and manipulate their properti interested in instantiating View objects at runtime, refer to the {@link android.view.ViewGroup} and {@link android.view.View} class references.

-

In general, the XML vocabulary for declaring UI elements closely follows the structure and naming of the classes and methods, where element names correspond to class names and attribute names correspond to methods. In fact, the correspondence is often so direct that you can guess what XML attribute corresponds to a class method, or guess what class corresponds to a given xml element. However, note that not all vocabulary is identical. In some cases, there are slight naming differences. For +

In general, the XML vocabulary for declaring UI elements closely follows the structure and naming of the classes and methods, where element names correspond to class names and attribute names correspond to methods. In fact, the correspondence is often so direct that you can guess what XML attribute corresponds to a class method, or guess what class corresponds to a given XML element. However, note that not all vocabulary is identical. In some cases, there are slight naming differences. For example, the EditText element has a text attribute that corresponds to EditText.setText().

@@ -115,7 +115,7 @@ href="{@docRoot}guide/topics/resources/layout-resource.html">Layout Resources{@link android.app.Activity#setContentView(int) setContentView()}, passing it the reference to your layout resource in the form of: -R.layout.layout_file_name +R.layout.layout_file_name. For example, if your XML layout is saved as main_layout.xml, you would load it for your Activity like so:

@@ -214,7 +214,7 @@ set the width or height: 

@@ -243,7 +243,7 @@ Available Resources document.

coordinate of the rectangle representing the view. The latter returns the top, or Y, coordinate of the rectangle representing the view. These methods both return the location of the view relative to its parent. For instance, - when getLeft() returns 20, that means the view is located 20 pixels to the + when getLeft() returns 20, that means the view is located 20 pixels to the right of the left edge of its direct parent.

@@ -282,7 +282,7 @@ Available Resources document.

To measure its dimensions, a view takes into account its padding. The padding is expressed in pixels for the left, top, right and bottom parts of the view. - Padding can be used to offset the content of the view by a specific amount of + Padding can be used to offset the content of the view by a specific number of pixels. For instance, a left padding of 2 will push the view's content by 2 pixels to the right of the left edge. Padding can be set using the {@link android.view.View#setPadding(int, int, int, int)} method and queried by calling @@ -375,7 +375,7 @@ alt="" />

When the content for your layout is dynamic or not pre-determined, you can use a layout that subclasses {@link android.widget.AdapterView} to populate the layout with views at runtime. A subclass of the {@link android.widget.AdapterView} class uses an {@link android.widget.Adapter} to -bind data to its layout. The {@link android.widget.Adapter} behaves as a middle-man between the data +bind data to its layout. The {@link android.widget.Adapter} behaves as a middleman between the data source and the {@link android.widget.AdapterView} layout—the {@link android.widget.Adapter} retrieves the data (from a source such as an array or a database query) and converts each entry into a view that can be added into the {@link android.widget.AdapterView} layout.

-- cgit v1.1