Merge \"Swap fill_parent with match_parent in best practices doc.\" into mnc-io-docs
am: df4528fbe8
Change-Id: Ie2039cf96c3591b6fc2c0cb8ec1097707edcc76b
This commit is contained in:
@@ -988,7 +988,7 @@ configurations.</p>
|
|||||||
on different screens:</p>
|
on different screens:</p>
|
||||||
|
|
||||||
<ol>
|
<ol>
|
||||||
<li>Use {@code wrap_content}, {@code fill_parent}, or {@code dp} units when specifying
|
<li>Use {@code wrap_content}, {@code match_parent}, or {@code dp} units when specifying
|
||||||
dimensions in an XML layout file</li>
|
dimensions in an XML layout file</li>
|
||||||
<li>Do not use hard coded pixel values in your application code</li>
|
<li>Do not use hard coded pixel values in your application code</li>
|
||||||
<li>Do not use {@code AbsoluteLayout} (it's deprecated)</li>
|
<li>Do not use {@code AbsoluteLayout} (it's deprecated)</li>
|
||||||
@@ -998,7 +998,7 @@ dimensions in an XML layout file</li>
|
|||||||
<p>The following sections provide more details.</p>
|
<p>The following sections provide more details.</p>
|
||||||
|
|
||||||
|
|
||||||
<h3 id="use-relative">1. Use wrap_content, fill_parent, or the dp unit for layout dimensions</h3>
|
<h3 id="use-relative">1. Use wrap_content, match_parent, or the dp unit for layout dimensions</h3>
|
||||||
|
|
||||||
<p>When defining the <a
|
<p>When defining the <a
|
||||||
href="{@docRoot}reference/android/view/ViewGroup.LayoutParams.html#attr_android:layout_width"
|
href="{@docRoot}reference/android/view/ViewGroup.LayoutParams.html#attr_android:layout_width"
|
||||||
@@ -1006,7 +1006,7 @@ href="{@docRoot}reference/android/view/ViewGroup.LayoutParams.html#attr_android:
|
|||||||
href="{@docRoot}reference/android/view/ViewGroup.LayoutParams.html#attr_android:layout_height"
|
href="{@docRoot}reference/android/view/ViewGroup.LayoutParams.html#attr_android:layout_height"
|
||||||
>{@code android:layout_height}</a> for
|
>{@code android:layout_height}</a> for
|
||||||
views in an XML layout file, using <code>"wrap_content"</code>,
|
views in an XML layout file, using <code>"wrap_content"</code>,
|
||||||
<code>"fill_parent"</code> or <code>dp</code> units guarantees that the view is
|
<code>"match_parent"</code> or <code>dp</code> units guarantees that the view is
|
||||||
given an appropriate size on the current device screen.</p>
|
given an appropriate size on the current device screen.</p>
|
||||||
|
|
||||||
<p>For instance, a view with a <code>layout_width="100dp"</code> measures 100 pixels wide on
|
<p>For instance, a view with a <code>layout_width="100dp"</code> measures 100 pixels wide on
|
||||||
|
|||||||
Reference in New Issue
Block a user