summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Solovay <asolovay@google.com>2014-07-15 18:06:19 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-07-15 16:05:01 +0000
commit3f8d9c9e0a67a87009ee42904d3f08fe2f1371c6 (patch)
treefa6a9a2b3eaf9685e71de284cf013d89a158de18
parent6a5dd93652ffce88891c2bd2dc7a19c764075631 (diff)
parente295205ea29bbae0b1fc05970eff265f7d72651b (diff)
downloadframeworks_base-3f8d9c9e0a67a87009ee42904d3f08fe2f1371c6.zip
frameworks_base-3f8d9c9e0a67a87009ee42904d3f08fe2f1371c6.tar.gz
frameworks_base-3f8d9c9e0a67a87009ee42904d3f08fe2f1371c6.tar.bz2
Merge "docs: Replaced deprecated fill_parent with match_parent." into klp-modular-docs
-rw-r--r--docs/html/guide/topics/ui/declaring-layout.jd8
-rw-r--r--docs/html/guide/topics/ui/layout/grid.jd8
-rw-r--r--docs/html/guide/topics/ui/layout/gridview.jd6
-rw-r--r--docs/html/guide/topics/ui/layout/linear.jd10
-rw-r--r--docs/html/guide/topics/ui/layout/relative.jd8
5 files changed, 20 insertions, 20 deletions
diff --git a/docs/html/guide/topics/ui/declaring-layout.jd b/docs/html/guide/topics/ui/declaring-layout.jd
index 6586c2f..40ae81e 100644
--- a/docs/html/guide/topics/ui/declaring-layout.jd
+++ b/docs/html/guide/topics/ui/declaring-layout.jd
@@ -88,8 +88,8 @@ to hold a {@link android.widget.TextView} and a {@link android.widget.Button}:</
<pre>
&lt;?xml version="1.0" encoding="utf-8"?>
&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:orientation="vertical" >
&lt;TextView android:id="@+id/text"
android:layout_width="wrap_content"
@@ -215,14 +215,14 @@ set the width or height: </p>
<ul>
<li><var>wrap_content</var> tells your view to size itself to the dimensions
required by its content</li>
- <li><var>fill_parent</var> (renamed <var>match_parent</var> in API Level 8)
+ <li><var>match_parent</var> (named <var>fill_parent</var> before API Level 8)
tells your view to become as big as its parent view group will allow.</li>
</ul>
<p>In general, specifying a layout width and height using absolute units such as
pixels is not recommended. Instead, using relative measurements such as
density-independent pixel units (<var>dp</var>), <var>wrap_content</var>, or
-<var>fill_parent</var>, is a better approach, because it helps ensure that
+<var>match_parent</var>, is a better approach, because it helps ensure that
your application will display properly across a variety of device screen sizes.
The accepted measurement types are defined in the
<a href="{@docRoot}guide/topics/resources/available-resources.html#dimension">
diff --git a/docs/html/guide/topics/ui/layout/grid.jd b/docs/html/guide/topics/ui/layout/grid.jd
index 52f453b..c2f1321 100644
--- a/docs/html/guide/topics/ui/layout/grid.jd
+++ b/docs/html/guide/topics/ui/layout/grid.jd
@@ -41,8 +41,8 @@ result, with cell borders displayed as dotted lines (added for visual effect). <
<pre>
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:stretchColumns="1">
&lt;TableRow>
&lt;TextView
@@ -82,8 +82,8 @@ documentation for more details. </p>
<pre>
&lt;?xml version="1.0" encoding="utf-8"?>
&lt;TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:stretchColumns="1">
&lt;TableRow>
diff --git a/docs/html/guide/topics/ui/layout/gridview.jd b/docs/html/guide/topics/ui/layout/gridview.jd
index bc189c4..b7dd94d 100644
--- a/docs/html/guide/topics/ui/layout/gridview.jd
+++ b/docs/html/guide/topics/ui/layout/gridview.jd
@@ -43,10 +43,10 @@ into the project's
<li>Open the <code>res/layout/main.xml</code> file and insert the following:
<pre>
&lt;?xml version="1.0" encoding="utf-8"?>
-&lt;GridView xmlns:android="http://schemas.android.com/apk/res/android"
+&lt;GridView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/gridview"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:columnWidth="90dp"
android:numColumns="auto_fit"
android:verticalSpacing="10dp"
diff --git a/docs/html/guide/topics/ui/layout/linear.jd b/docs/html/guide/topics/ui/layout/linear.jd
index 444dc71..fb55165 100644
--- a/docs/html/guide/topics/ui/layout/linear.jd
+++ b/docs/html/guide/topics/ui/layout/linear.jd
@@ -82,21 +82,21 @@ share the rest equally.</p>
<pre>
&lt;?xml version="1.0" encoding="utf-8"?>
&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:orientation="vertical" >
&lt;EditText
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/to" />
&lt;EditText
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/subject" />
&lt;EditText
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:gravity="top"
diff --git a/docs/html/guide/topics/ui/layout/relative.jd b/docs/html/guide/topics/ui/layout/relative.jd
index 65c5617..145c838 100644
--- a/docs/html/guide/topics/ui/layout/relative.jd
+++ b/docs/html/guide/topics/ui/layout/relative.jd
@@ -82,13 +82,13 @@ view declared in the hierarchy. The example below demonstrates such a scenario.<
<pre>
&lt;?xml version="1.0" encoding="utf-8"?>
&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:paddingLeft="16dp"
android:paddingRight="16dp" >
&lt;EditText
android:id="@+id/name"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/reminder" />
&lt;Spinner
@@ -114,4 +114,4 @@ view declared in the hierarchy. The example below demonstrates such a scenario.<
</pre>
<p>For details about all the layout attributes available to each child view of a {@link
-android.widget.RelativeLayout}, see {@link android.widget.RelativeLayout.LayoutParams}.</p> \ No newline at end of file
+android.widget.RelativeLayout}, see {@link android.widget.RelativeLayout.LayoutParams}.</p>