Deprecate fill_parent and introduce match_parent.
Bug: #2361749.
diff --git a/res/layout-land/application_boxed.xml b/res/layout-land/application_boxed.xml
index 7656b58..dc62361 100644
--- a/res/layout-land/application_boxed.xml
+++ b/res/layout-land/application_boxed.xml
@@ -16,7 +16,7 @@
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/name"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="88dip"
android:paddingLeft="2dip"
diff --git a/res/layout-land/launcher.xml b/res/layout-land/launcher.xml
index d2009b8..da944b7 100644
--- a/res/layout-land/launcher.xml
+++ b/res/layout-land/launcher.xml
@@ -19,13 +19,13 @@
xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher2"
android:id="@+id/drag_layer"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
<com.android.launcher2.AllAppsView
android:id="@+id/all_apps_view"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:scrollbarStyle="outsideInset"
android:drawSelectorOnTop="false"
@@ -37,8 +37,8 @@
<!-- The workspace contains 3 screens of cells -->
<com.android.launcher2.Workspace
android:id="@+id/workspace"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:scrollbars="horizontal"
android:fadeScrollbars="true"
launcher:defaultScreen="2">
@@ -82,7 +82,7 @@
<com.android.launcher2.HandleView
android:id="@+id/all_apps_button"
android:layout_width="@dimen/button_bar_height"
- android:layout_height="fill_parent"
+ android:layout_height="match_parent"
android:layout_gravity="right|center_vertical"
android:focusable="true"
@@ -96,7 +96,7 @@
<com.android.launcher2.DeleteZone
android:id="@+id/delete_zone"
android:layout_width="49dip"
- android:layout_height="fill_parent"
+ android:layout_height="match_parent"
android:scaleType="center"
android:src="@drawable/delete_zone_selector"
diff --git a/res/layout-land/live_folder_grid.xml b/res/layout-land/live_folder_grid.xml
index 572c295..44519d4 100644
--- a/res/layout-land/live_folder_grid.xml
+++ b/res/layout-land/live_folder_grid.xml
@@ -27,12 +27,12 @@
android:textSize="14sp"
android:textColor="#404040"
android:textStyle="bold"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content" />
<GridView
android:id="@+id/folder_content"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1"
diff --git a/res/layout-land/user_folder.xml b/res/layout-land/user_folder.xml
index 645c02f..b05974a 100644
--- a/res/layout-land/user_folder.xml
+++ b/res/layout-land/user_folder.xml
@@ -24,12 +24,12 @@
android:textSize="14sp"
android:textColor="#404040"
android:textStyle="bold"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content" />
<GridView
android:id="@id/folder_content"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1"
diff --git a/res/layout-land/workspace_screen.xml b/res/layout-land/workspace_screen.xml
index 531bac2..299478e 100644
--- a/res/layout-land/workspace_screen.xml
+++ b/res/layout-land/workspace_screen.xml
@@ -18,8 +18,8 @@
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher2"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
launcher:cellWidth="@dimen/workspace_cell_width"
launcher:cellHeight="@dimen/workspace_cell_height"
diff --git a/res/layout-port/application_boxed.xml b/res/layout-port/application_boxed.xml
index a6991d5..5e64cee 100644
--- a/res/layout-port/application_boxed.xml
+++ b/res/layout-port/application_boxed.xml
@@ -16,7 +16,7 @@
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/name"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="88dip"
android:paddingLeft="2dip"
diff --git a/res/layout-port/launcher.xml b/res/layout-port/launcher.xml
index 001f3e3..f73e91c 100644
--- a/res/layout-port/launcher.xml
+++ b/res/layout-port/launcher.xml
@@ -19,13 +19,13 @@
xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher2"
android:id="@+id/drag_layer"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
<com.android.launcher2.AllAppsView
android:id="@+id/all_apps_view"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:scrollbarStyle="outsideInset"
android:drawSelectorOnTop="false"
@@ -38,8 +38,8 @@
<!-- The workspace contains 3 screens of cells -->
<com.android.launcher2.Workspace
android:id="@+id/workspace"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
launcher:defaultScreen="2">
<include android:id="@+id/cell1" layout="@layout/workspace_screen" />
diff --git a/res/layout-port/live_folder_grid.xml b/res/layout-port/live_folder_grid.xml
index 51e5e47..745307f 100644
--- a/res/layout-port/live_folder_grid.xml
+++ b/res/layout-port/live_folder_grid.xml
@@ -27,12 +27,12 @@
android:textSize="14sp"
android:textColor="#404040"
android:textStyle="bold"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content" />
<GridView
android:id="@id/folder_content"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1"
diff --git a/res/layout-port/user_folder.xml b/res/layout-port/user_folder.xml
index 6a189dc..7377cde 100644
--- a/res/layout-port/user_folder.xml
+++ b/res/layout-port/user_folder.xml
@@ -24,12 +24,12 @@
android:textSize="14sp"
android:textColor="#404040"
android:textStyle="bold"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content" />
<GridView
android:id="@id/folder_content"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1"
diff --git a/res/layout-port/workspace_screen.xml b/res/layout-port/workspace_screen.xml
index 531bac2..299478e 100644
--- a/res/layout-port/workspace_screen.xml
+++ b/res/layout-port/workspace_screen.xml
@@ -18,8 +18,8 @@
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher2"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
launcher:cellWidth="@dimen/workspace_cell_width"
launcher:cellHeight="@dimen/workspace_cell_height"
diff --git a/res/layout/add_list_item.xml b/res/layout/add_list_item.xml
index f276511..62fc4f4 100644
--- a/res/layout/add_list_item.xml
+++ b/res/layout/add_list_item.xml
@@ -15,7 +15,7 @@
-->
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?android:attr/listPreferredItemHeight"
android:textAppearance="?android:attr/textAppearanceLargeInverse"
diff --git a/res/layout/application_list.xml b/res/layout/application_list.xml
index 29f7400..b515c9e 100644
--- a/res/layout/application_list.xml
+++ b/res/layout/application_list.xml
@@ -18,7 +18,7 @@
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="?android:attr/listPreferredItemHeight"
android:paddingLeft="10dip"
@@ -34,7 +34,7 @@
<LinearLayout
android:layout_width="0dip"
android:layout_weight="1.0"
- android:layout_height="fill_parent"
+ android:layout_height="match_parent"
android:paddingLeft="8dip"
android:paddingRight="8dip"
diff --git a/res/layout/list_checkbox_2lines.xml b/res/layout/list_checkbox_2lines.xml
index ed80c5f..1debcd6 100644
--- a/res/layout/list_checkbox_2lines.xml
+++ b/res/layout/list_checkbox_2lines.xml
@@ -15,7 +15,7 @@
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?android:attr/listPreferredItemHeight"
android:gravity="center_vertical"
diff --git a/res/layout/live_folder_list.xml b/res/layout/live_folder_list.xml
index cf3d2f1..e5a305f 100644
--- a/res/layout/live_folder_list.xml
+++ b/res/layout/live_folder_list.xml
@@ -27,12 +27,12 @@
android:textSize="14sp"
android:textColor="#404040"
android:textStyle="bold"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content" />
<ListView
android:id="@id/folder_content"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1"
diff --git a/res/layout/pick_item.xml b/res/layout/pick_item.xml
index f276511..62fc4f4 100644
--- a/res/layout/pick_item.xml
+++ b/res/layout/pick_item.xml
@@ -15,7 +15,7 @@
-->
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?android:attr/listPreferredItemHeight"
android:textAppearance="?android:attr/textAppearanceLargeInverse"
diff --git a/res/layout/rename_folder.xml b/res/layout/rename_folder.xml
index cbb42b4..75eb504 100644
--- a/res/layout/rename_folder.xml
+++ b/res/layout/rename_folder.xml
@@ -15,7 +15,7 @@
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="20dip"
android:orientation="vertical">
@@ -31,7 +31,7 @@
<EditText
android:id="@+id/folder_name"
android:layout_height="wrap_content"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:scrollHorizontally="true"
android:autoText="false"
android:capitalize="none"
diff --git a/res/layout/wallpaper_chooser.xml b/res/layout/wallpaper_chooser.xml
index 7267246..92a6596 100644
--- a/res/layout/wallpaper_chooser.xml
+++ b/res/layout/wallpaper_chooser.xml
@@ -20,17 +20,17 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
<ImageView android:id="@+id/wallpaper"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1.0"
android:scaleType="fitCenter" />
<Gallery android:id="@+id/gallery"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content" />
<Button android:id="@+id/set"
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 125a1be..f90810f 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -35,8 +35,8 @@
<item name="android:shadowRadius">2.0</item>
<item name="android:textColor">#FFF</item>
<item name="android:gravity">center_horizontal</item>
- <item name="android:layout_width">fill_parent</item>
- <item name="android:layout_height">fill_parent</item>
+ <item name="android:layout_width">match_parent</item>
+ <item name="android:layout_height">match_parent</item>
<item name="android:background">@drawable/shortcut_selector</item>
<item name="android:paddingLeft">5dip</item>
<item name="android:paddingRight">5dip</item>
diff --git a/src/com/android/launcher2/CellLayout.java b/src/com/android/launcher2/CellLayout.java
index 6970875..df8ca89 100644
--- a/src/com/android/launcher2/CellLayout.java
+++ b/src/com/android/launcher2/CellLayout.java
@@ -901,7 +901,7 @@
}
public LayoutParams(int cellX, int cellY, int cellHSpan, int cellVSpan) {
- super(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT);
+ super(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
this.cellX = cellX;
this.cellY = cellY;
this.cellHSpan = cellHSpan;