Skip to content

Commit d316145

Browse files
committed
Minor typos, consistency things, one grammatical error.
Change-Id: I65ad160b9c49bc9c7e762d3628e69c518742ef4c
1 parent 25303a9 commit d316145

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ application can create View and ViewGroup objects (and manipulate their properti
7171
interested in instantiating View objects at runtime, refer to the {@link android.view.ViewGroup} and
7272
{@link android.view.View} class references.</p>
7373

74-
<p>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
74+
<p>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
7575
example, the EditText element has a <code>text</code> attribute that corresponds to
7676
<code>EditText.setText()</code>. </p>
7777

@@ -115,7 +115,7 @@ href="{@docRoot}guide/topics/resources/layout-resource.html">Layout Resources</a
115115
{@link android.app.Activity#onCreate(android.os.Bundle) Activity.onCreate()} callback implementation.
116116
Do so by calling <code>{@link android.app.Activity#setContentView(int) setContentView()}</code>,
117117
passing it the reference to your layout resource in the form of:
118-
<code>R.layout.<em>layout_file_name</em></code>
118+
<code>R.layout.<em>layout_file_name</em></code>.
119119
For example, if your XML layout is saved as <code>main_layout.xml</code>, you would load it
120120
for your Activity like so:</p>
121121
<pre>
@@ -214,7 +214,7 @@ set the width or height: </p>
214214

215215
<ul>
216216
<li><var>wrap_content</var> tells your view to size itself to the dimensions
217-
required by its content</li>
217+
required by its content.</li>
218218
<li><var>match_parent</var> (named <var>fill_parent</var> before API Level 8)
219219
tells your view to become as big as its parent view group will allow.</li>
220220
</ul>
@@ -243,7 +243,7 @@ Available Resources</a> document.</p>
243243
coordinate of the rectangle representing the view. The latter returns the
244244
top, or Y, coordinate of the rectangle representing the view. These methods
245245
both return the location of the view relative to its parent. For instance,
246-
when getLeft() returns 20, that means the view is located 20 pixels to the
246+
when <code>getLeft()</code> returns 20, that means the view is located 20 pixels to the
247247
right of the left edge of its direct parent.
248248
</p>
249249

@@ -282,7 +282,7 @@ Available Resources</a> document.</p>
282282
<p>
283283
To measure its dimensions, a view takes into account its padding. The padding
284284
is expressed in pixels for the left, top, right and bottom parts of the view.
285-
Padding can be used to offset the content of the view by a specific amount of
285+
Padding can be used to offset the content of the view by a specific number of
286286
pixels. For instance, a left padding of 2 will push the view's content by
287287
2 pixels to the right of the left edge. Padding can be set using the
288288
{@link android.view.View#setPadding(int, int, int, int)} method and queried by calling
@@ -375,7 +375,7 @@ alt="" /></a>
375375
<p>When the content for your layout is dynamic or not pre-determined, you can use a layout that
376376
subclasses {@link android.widget.AdapterView} to populate the layout with views at runtime. A
377377
subclass of the {@link android.widget.AdapterView} class uses an {@link android.widget.Adapter} to
378-
bind data to its layout. The {@link android.widget.Adapter} behaves as a middle-man between the data
378+
bind data to its layout. The {@link android.widget.Adapter} behaves as a middleman between the data
379379
source and the {@link android.widget.AdapterView} layout&mdash;the {@link android.widget.Adapter}
380380
retrieves the data (from a source such as an array or a database query) and converts each entry
381381
into a view that can be added into the {@link android.widget.AdapterView} layout.</p>

0 commit comments

Comments
 (0)