Merge \"Docs: Replaced fill_parent with match_parent\" into mnc-io-docs
am: 1b72b7955d
Change-Id: I8fec574e1501e84f69d9e53b02b0a7537bd3dc16
This commit is contained in:
@@ -33,16 +33,17 @@ In XML: <code>@[<em>package</em>:]layout/<em>filename</em></code>
|
|||||||
<dt>syntax:</dt>
|
<dt>syntax:</dt>
|
||||||
<dd>
|
<dd>
|
||||||
<pre class="stx">
|
<pre class="stx">
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<<a href="#viewgroup-element"><em>ViewGroup</em></a> xmlns:android="http://schemas.android.com/apk/res/android"
|
<<a href="#viewgroup-element"><em>ViewGroup</em></a>
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:id="@[+][<em>package</em>:]id/<em>resource_name</em>"
|
android:id="@[+][<em>package</em>:]id/<em>resource_name</em>"
|
||||||
android:layout_height=["<em>dimension</em>" | "fill_parent" | "wrap_content"]
|
android:layout_height=["<em>dimension</em>" | "match_parent" | "wrap_content"]
|
||||||
android:layout_width=["<em>dimension</em>" | "fill_parent" | "wrap_content"]
|
android:layout_width=["<em>dimension</em>" | "match_parent" | "wrap_content"]
|
||||||
[<em>ViewGroup-specific attributes</em>] >
|
[<em>ViewGroup-specific attributes</em>] >
|
||||||
<<a href="#view-element"><em>View</em></a>
|
<<a href="#view-element"><em>View</em></a>
|
||||||
android:id="@[+][<em>package</em>:]id/<em>resource_name</em>"
|
android:id="@[+][<em>package</em>:]id/<em>resource_name</em>"
|
||||||
android:layout_height=["<em>dimension</em>" | "fill_parent" | "wrap_content"]
|
android:layout_height=["<em>dimension</em>" | "match_parent" | "wrap_content"]
|
||||||
android:layout_width=["<em>dimension</em>" | "fill_parent" | "wrap_content"]
|
android:layout_width=["<em>dimension</em>" | "match_parent" | "wrap_content"]
|
||||||
[<em>View-specific attributes</em>] >
|
[<em>View-specific attributes</em>] >
|
||||||
<<a href="#requestfocus-element">requestFocus</a>/>
|
<<a href="#requestfocus-element">requestFocus</a>/>
|
||||||
</<em>View</em>>
|
</<em>View</em>>
|
||||||
@@ -82,15 +83,17 @@ about the <a href="#idvalue">value for {@code android:id}</a> below.
|
|||||||
</dd>
|
</dd>
|
||||||
<dt><code>android:layout_height</code></dt>
|
<dt><code>android:layout_height</code></dt>
|
||||||
<dd><em>Dimension or keyword</em>. <strong>Required</strong>. The height for the group, as a
|
<dd><em>Dimension or keyword</em>. <strong>Required</strong>. The height for the group, as a
|
||||||
dimension value (or <a
|
dimension value (or
|
||||||
href="more-resources.html#Dimension">dimension resource</a>) or a keyword ({@code "fill_parent"}
|
<a href="more-resources.html#Dimension">dimension resource</a>) or a keyword
|
||||||
or {@code "wrap_content"}). See the <a href="#layoutvalues">valid values</a> below.
|
({@code "match_parent"} or {@code "wrap_content"}). See the <a href=
|
||||||
|
"#layoutvalues">valid values</a> below.
|
||||||
</dd>
|
</dd>
|
||||||
<dt><code>android:layout_width</code></dt>
|
<dt><code>android:layout_width</code></dt>
|
||||||
<dd><em>Dimension or keyword</em>. <strong>Required</strong>. The width for the group, as a
|
<dd><em>Dimension or keyword</em>. <strong>Required</strong>. The width for the group, as a
|
||||||
dimension value (or <a
|
dimension value (or
|
||||||
href="more-resources.html#Dimension">dimension resource</a>) or a keyword ({@code "fill_parent"}
|
<a href="more-resources.html#Dimension">dimension resource</a>) or a keyword
|
||||||
or {@code "wrap_content"}). See the <a href="#layoutvalues">valid values</a> below.
|
({@code "match_parent"} or {@code "wrap_content"}). See the <a href=
|
||||||
|
"#layoutvalues">valid values</a> below.
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<p>More attributes are supported by the {@link android.view.ViewGroup}
|
<p>More attributes are supported by the {@link android.view.ViewGroup}
|
||||||
@@ -114,15 +117,17 @@ the <a href="#idvalue">value for {@code android:id}</a> below.
|
|||||||
</dd>
|
</dd>
|
||||||
<dt><code>android:layout_height</code></dt>
|
<dt><code>android:layout_height</code></dt>
|
||||||
<dd><em>Dimension or keyword</em>. <strong>Required</strong>. The height for the element, as
|
<dd><em>Dimension or keyword</em>. <strong>Required</strong>. The height for the element, as
|
||||||
a dimension value (or <a
|
a dimension value (or
|
||||||
href="more-resources.html#Dimension">dimension resource</a>) or a keyword ({@code "fill_parent"}
|
<a href="more-resources.html#Dimension">dimension resource</a>) or a keyword
|
||||||
or {@code "wrap_content"}). See the <a href="#layoutvalues">valid values</a> below.
|
({@code "match_parent"} or {@code "wrap_content"}). See the <a href=
|
||||||
|
"#layoutvalues">valid values</a> below.
|
||||||
</dd>
|
</dd>
|
||||||
<dt><code>android:layout_width</code></dt>
|
<dt><code>android:layout_width</code></dt>
|
||||||
<dd><em>Dimension or keyword</em>. <strong>Required</strong>. The width for the element, as
|
<dd><em>Dimension or keyword</em>. <strong>Required</strong>. The width for the element, as
|
||||||
a dimension value (or <a
|
a dimension value (or
|
||||||
href="more-resources.html#Dimension">dimension resource</a>) or a keyword ({@code "fill_parent"}
|
<a href="more-resources.html#Dimension">dimension resource</a>) or a keyword
|
||||||
or {@code "wrap_content"}). See the <a href="#layoutvalues">valid values</a> below.
|
({@code "match_parent"} or {@code "wrap_content"}). See the <a href=
|
||||||
|
"#layoutvalues">valid values</a> below.
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<p>More attributes are supported by the {@link android.view.View}
|
<p>More attributes are supported by the {@link android.view.View}
|
||||||
@@ -221,9 +226,6 @@ plus symbol in the <code>android:id</code> value.</p>
|
|||||||
deprecate <code>fill_parent</code>.</td>
|
deprecate <code>fill_parent</code>.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>fill_parent</code></td>
|
|
||||||
<td>Sets the dimension to match that of the parent element.</td>
|
|
||||||
</tr><tr>
|
|
||||||
<td><code>wrap_content</code></td>
|
<td><code>wrap_content</code></td>
|
||||||
<td>Sets the dimension only to the size required to fit the content of this element.</td>
|
<td>Sets the dimension only to the size required to fit the content of this element.</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -245,8 +247,8 @@ guide.
|
|||||||
<pre>
|
<pre>
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="fill_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical" >
|
android:orientation="vertical" >
|
||||||
<TextView android:id="@+id/text"
|
<TextView android:id="@+id/text"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
|||||||
Reference in New Issue
Block a user