From e295205ea29bbae0b1fc05970eff265f7d72651b Mon Sep 17 00:00:00 2001 From: Andrew Solovay Date: Mon, 7 Jul 2014 13:51:17 -0700 Subject: [PATCH] docs: Replaced deprecated fill_parent with match_parent. Docs are staged to http://asolovay.mtv:9689/guide/topics/ui/declaring-layout.html (...and its child pages.) bug: 15939689 Change-Id: I6c4c816fd0e983afb3425e9adc0e1e0a2cfc87ed --- docs/html/guide/topics/ui/declaring-layout.jd | 8 ++++---- docs/html/guide/topics/ui/layout/grid.jd | 8 ++++---- docs/html/guide/topics/ui/layout/gridview.jd | 6 +++--- docs/html/guide/topics/ui/layout/linear.jd | 10 +++++----- docs/html/guide/topics/ui/layout/relative.jd | 8 ++++---- 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 6586c2f1a767c..40ae81e74f74e 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}: <?xml version="1.0" encoding="utf-8"?> <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" > <TextView android:id="@+id/text" android:layout_width="wrap_content" @@ -215,14 +215,14 @@ set the width or height:

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 (dp), wrap_content, or -fill_parent, is a better approach, because it helps ensure that +match_parent, 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 diff --git a/docs/html/guide/topics/ui/layout/grid.jd b/docs/html/guide/topics/ui/layout/grid.jd index 52f453bb6a339..c2f13215f0649 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). <

 <?xml version="1.0" encoding="utf-8"?>
 <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">
     <TableRow>
         <TextView
@@ -82,8 +82,8 @@ documentation for more details. 

 <?xml version="1.0" encoding="utf-8"?>
 <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">
 
     <TableRow>
diff --git a/docs/html/guide/topics/ui/layout/gridview.jd b/docs/html/guide/topics/ui/layout/gridview.jd
index bc189c45de000..b7dd94df5e8dc 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
   
  • Open the res/layout/main.xml file and insert the following:
     <?xml version="1.0" encoding="utf-8"?>
    -<GridView xmlns:android="http://schemas.android.com/apk/res/android" 
    +<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 444dc71edf41f..fb55165e7ebcf 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.

     <?xml version="1.0" encoding="utf-8"?>
     <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" >
         <EditText
    -        android:layout_width="fill_parent"
    +        android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:hint="@string/to" />
         <EditText
    -        android:layout_width="fill_parent"
    +        android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:hint="@string/subject" />
         <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 65c56172fb02f..145c8387d2c1f 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.<
     
     <?xml version="1.0" encoding="utf-8"?>
     <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" >
         <EditText
             android:id="@+id/name"
    -        android:layout_width="fill_parent"
    +        android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:hint="@string/reminder" />
         <Spinner
    @@ -114,4 +114,4 @@ view declared in the hierarchy. The example below demonstrates such a scenario.<
     

    For details about all the layout attributes available to each child view of a {@link -android.widget.RelativeLayout}, see {@link android.widget.RelativeLayout.LayoutParams}.

    \ No newline at end of file +android.widget.RelativeLayout}, see {@link android.widget.RelativeLayout.LayoutParams}.