summaryrefslogtreecommitdiffstats
path: root/core/java
diff options
context:
space:
mode:
authorRomain Guy <romainguy@android.com>2010-01-08 15:06:28 -0800
committerRomain Guy <romainguy@android.com>2010-01-08 15:11:38 -0800
commit980a938c1c9a6a5791a8240e5a1e6638ab28dc77 (patch)
tree75a3a1347b5423cc98859d3976076cea3dc22564 /core/java
parent0a0289420227fee51406cf4cc508f09d8ecdd2f4 (diff)
downloadframeworks_base-980a938c1c9a6a5791a8240e5a1e6638ab28dc77.zip
frameworks_base-980a938c1c9a6a5791a8240e5a1e6638ab28dc77.tar.gz
frameworks_base-980a938c1c9a6a5791a8240e5a1e6638ab28dc77.tar.bz2
Deprecate fill_parent and introduce match_parent.
Bug: #2361749.
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/app/Activity.java4
-rw-r--r--core/java/android/app/AlertDialog.java2
-rw-r--r--core/java/android/app/Dialog.java4
-rw-r--r--core/java/android/app/ExpandableListActivity.java18
-rw-r--r--core/java/android/app/ListActivity.java18
-rw-r--r--core/java/android/app/SearchDialog.java4
-rw-r--r--core/java/android/appwidget/AppWidgetHostView.java4
-rw-r--r--core/java/android/content/package.html14
-rw-r--r--core/java/android/inputmethodservice/InputMethodService.java20
-rw-r--r--core/java/android/preference/EditTextPreference.java3
-rw-r--r--core/java/android/service/wallpaper/WallpaperService.java4
-rw-r--r--core/java/android/view/View.java2
-rw-r--r--core/java/android/view/ViewGroup.java42
-rw-r--r--core/java/android/view/ViewRoot.java2
-rw-r--r--core/java/android/view/Window.java2
-rw-r--r--core/java/android/view/WindowManager.java12
-rw-r--r--core/java/android/webkit/WebView.java5
-rw-r--r--core/java/android/widget/AbsSpinner.java2
-rw-r--r--core/java/android/widget/AbsoluteLayout.java4
-rw-r--r--core/java/android/widget/AutoCompleteTextView.java38
-rw-r--r--core/java/android/widget/FrameLayout.java10
-rw-r--r--core/java/android/widget/GridView.java4
-rw-r--r--core/java/android/widget/LinearLayout.java30
-rw-r--r--core/java/android/widget/ListView.java6
-rw-r--r--core/java/android/widget/MediaController.java4
-rw-r--r--core/java/android/widget/PopupWindow.java10
-rw-r--r--core/java/android/widget/RelativeLayout.java4
-rw-r--r--core/java/android/widget/SlidingDrawer.java10
-rw-r--r--core/java/android/widget/TabHost.java4
-rw-r--r--core/java/android/widget/TabWidget.java7
-rw-r--r--core/java/android/widget/TableLayout.java16
-rw-r--r--core/java/android/widget/TableRow.java12
-rw-r--r--core/java/android/widget/TextView.java6
-rw-r--r--core/java/android/widget/ViewSwitcher.java2
-rw-r--r--core/java/android/widget/ZoomButtonsController.java2
-rw-r--r--core/java/com/android/internal/app/AlertController.java14
-rw-r--r--core/java/com/android/internal/view/menu/IconMenuItemView.java2
-rw-r--r--core/java/com/android/internal/widget/SlidingTab.java5
38 files changed, 175 insertions, 177 deletions
diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java
index 49ebce3..1c3414d 100644
--- a/core/java/android/app/Activity.java
+++ b/core/java/android/app/Activity.java
@@ -2087,8 +2087,8 @@ public class Activity extends ContextThemeWrapper
event.setPackageName(getPackageName());
LayoutParams params = getWindow().getAttributes();
- boolean isFullScreen = (params.width == LayoutParams.FILL_PARENT) &&
- (params.height == LayoutParams.FILL_PARENT);
+ boolean isFullScreen = (params.width == LayoutParams.MATCH_PARENT) &&
+ (params.height == LayoutParams.MATCH_PARENT);
event.setFullScreen(isFullScreen);
CharSequence title = getTitle();
diff --git a/core/java/android/app/AlertDialog.java b/core/java/android/app/AlertDialog.java
index 20a579a..2603579 100644
--- a/core/java/android/app/AlertDialog.java
+++ b/core/java/android/app/AlertDialog.java
@@ -40,7 +40,7 @@ import com.android.internal.app.AlertController;
*
* <pre>
* FrameLayout fl = (FrameLayout) findViewById(R.id.body);
- * fl.add(myView, new LayoutParams(FILL_PARENT, WRAP_CONTENT));
+ * fl.add(myView, new LayoutParams(MATCH_PARENT, WRAP_CONTENT));
* </pre>
*
* <p>The AlertDialog class takes care of automatically setting
diff --git a/core/java/android/app/Dialog.java b/core/java/android/app/Dialog.java
index 58e8b32..fa5d4a8 100644
--- a/core/java/android/app/Dialog.java
+++ b/core/java/android/app/Dialog.java
@@ -668,8 +668,8 @@ public class Dialog implements DialogInterface, Window.Callback,
event.setPackageName(mContext.getPackageName());
LayoutParams params = getWindow().getAttributes();
- boolean isFullScreen = (params.width == LayoutParams.FILL_PARENT) &&
- (params.height == LayoutParams.FILL_PARENT);
+ boolean isFullScreen = (params.width == LayoutParams.MATCH_PARENT) &&
+ (params.height == LayoutParams.MATCH_PARENT);
event.setFullScreen(isFullScreen);
return false;
diff --git a/core/java/android/app/ExpandableListActivity.java b/core/java/android/app/ExpandableListActivity.java
index a2e048f..9651078 100644
--- a/core/java/android/app/ExpandableListActivity.java
+++ b/core/java/android/app/ExpandableListActivity.java
@@ -65,21 +65,21 @@ import java.util.Map;
* &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
* &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
* android:orientation=&quot;vertical&quot;
- * android:layout_width=&quot;fill_parent&quot;
- * android:layout_height=&quot;fill_parent&quot;
+ * android:layout_width=&quot;match_parent&quot;
+ * android:layout_height=&quot;match_parent&quot;
* android:paddingLeft=&quot;8dp&quot;
* android:paddingRight=&quot;8dp&quot;&gt;
*
* &lt;ExpandableListView android:id=&quot;@id/android:list&quot;
- * android:layout_width=&quot;fill_parent&quot;
- * android:layout_height=&quot;fill_parent&quot;
+ * android:layout_width=&quot;match_parent&quot;
+ * android:layout_height=&quot;match_parent&quot;
* android:background=&quot;#00FF00&quot;
* android:layout_weight=&quot;1&quot;
* android:drawSelectorOnTop=&quot;false&quot;/&gt;
*
* &lt;TextView android:id=&quot;@id/android:empty&quot;
- * android:layout_width=&quot;fill_parent&quot;
- * android:layout_height=&quot;fill_parent&quot;
+ * android:layout_width=&quot;match_parent&quot;
+ * android:layout_height=&quot;match_parent&quot;
* android:background=&quot;#FF0000&quot;
* android:text=&quot;No data&quot;/&gt;
* &lt;/LinearLayout&gt;
@@ -114,19 +114,19 @@ import java.util.Map;
* <pre>
* &lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
* &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- * android:layout_width=&quot;fill_parent&quot;
+ * android:layout_width=&quot;match_parent&quot;
* android:layout_height=&quot;wrap_content&quot;
* android:orientation=&quot;vertical&quot;&gt;
*
* &lt;TextView android:id=&quot;@+id/text1&quot;
* android:textSize=&quot;16sp&quot;
* android:textStyle=&quot;bold&quot;
- * android:layout_width=&quot;fill_parent&quot;
+ * android:layout_width=&quot;match_parent&quot;
* android:layout_height=&quot;wrap_content&quot;/&gt;
*
* &lt;TextView android:id=&quot;@+id/text2&quot;
* android:textSize=&quot;16sp&quot;
- * android:layout_width=&quot;fill_parent&quot;
+ * android:layout_width=&quot;match_parent&quot;
* android:layout_height=&quot;wrap_content&quot;/&gt;
* &lt;/LinearLayout&gt;
* </pre>
diff --git a/core/java/android/app/ListActivity.java b/core/java/android/app/ListActivity.java
index 19b99c8..4b4cc05 100644
--- a/core/java/android/app/ListActivity.java
+++ b/core/java/android/app/ListActivity.java
@@ -56,21 +56,21 @@ import android.widget.ListView;
* &lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
* &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
* android:orientation=&quot;vertical&quot;
- * android:layout_width=&quot;fill_parent&quot;
- * android:layout_height=&quot;fill_parent&quot;
+ * android:layout_width=&quot;match_parent&quot;
+ * android:layout_height=&quot;match_parent&quot;
* android:paddingLeft=&quot;8dp&quot;
* android:paddingRight=&quot;8dp&quot;&gt;
*
* &lt;ListView android:id=&quot;@id/android:list&quot;
- * android:layout_width=&quot;fill_parent&quot;
- * android:layout_height=&quot;fill_parent&quot;
+ * android:layout_width=&quot;match_parent&quot;
+ * android:layout_height=&quot;match_parent&quot;
* android:background=&quot;#00FF00&quot;
* android:layout_weight=&quot;1&quot;
* android:drawSelectorOnTop=&quot;false&quot;/&gt;
*
* &lt;TextView id=&quot;@id/android:empty&quot;
- * android:layout_width=&quot;fill_parent&quot;
- * android:layout_height=&quot;fill_parent&quot;
+ * android:layout_width=&quot;match_parent&quot;
+ * android:layout_height=&quot;match_parent&quot;
* android:background=&quot;#FF0000&quot;
* android:text=&quot;No data&quot;/&gt;
* &lt;/LinearLayout&gt;
@@ -100,19 +100,19 @@ import android.widget.ListView;
* <pre>
* &lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
* &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- * android:layout_width=&quot;fill_parent&quot;
+ * android:layout_width=&quot;match_parent&quot;
* android:layout_height=&quot;wrap_content&quot;
* android:orientation=&quot;vertical&quot;&gt;
*
* &lt;TextView android:id=&quot;@+id/text1&quot;
* android:textSize=&quot;16sp&quot;
* android:textStyle=&quot;bold&quot;
- * android:layout_width=&quot;fill_parent&quot;
+ * android:layout_width=&quot;match_parent&quot;
* android:layout_height=&quot;wrap_content&quot;/&gt;
*
* &lt;TextView android:id=&quot;@+id/text2&quot;
* android:textSize=&quot;16sp&quot;
- * android:layout_width=&quot;fill_parent&quot;
+ * android:layout_width=&quot;match_parent&quot;
* android:layout_height=&quot;wrap_content&quot;/&gt;
* &lt;/LinearLayout&gt;
* </pre>
diff --git a/core/java/android/app/SearchDialog.java b/core/java/android/app/SearchDialog.java
index b204c79..8968553 100644
--- a/core/java/android/app/SearchDialog.java
+++ b/core/java/android/app/SearchDialog.java
@@ -182,11 +182,11 @@ public class SearchDialog extends Dialog implements OnItemClickListener, OnItemS
Window theWindow = getWindow();
WindowManager.LayoutParams lp = theWindow.getAttributes();
lp.type = WindowManager.LayoutParams.TYPE_SEARCH_BAR;
- lp.width = ViewGroup.LayoutParams.FILL_PARENT;
+ lp.width = ViewGroup.LayoutParams.MATCH_PARENT;
// taking up the whole window (even when transparent) is less than ideal,
// but necessary to show the popup window until the window manager supports
// having windows anchored by their parent but not clipped by them.
- lp.height = ViewGroup.LayoutParams.FILL_PARENT;
+ lp.height = ViewGroup.LayoutParams.MATCH_PARENT;
lp.gravity = Gravity.TOP | Gravity.FILL_HORIZONTAL;
lp.softInputMode = WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE;
theWindow.setAttributes(lp);
diff --git a/core/java/android/appwidget/AppWidgetHostView.java b/core/java/android/appwidget/AppWidgetHostView.java
index 2f719f3..792b289 100644
--- a/core/java/android/appwidget/AppWidgetHostView.java
+++ b/core/java/android/appwidget/AppWidgetHostView.java
@@ -311,8 +311,8 @@ public class AppWidgetHostView extends FrameLayout {
// Take requested dimensions from child, but apply default gravity.
FrameLayout.LayoutParams requested = (FrameLayout.LayoutParams)view.getLayoutParams();
if (requested == null) {
- requested = new FrameLayout.LayoutParams(LayoutParams.FILL_PARENT,
- LayoutParams.FILL_PARENT);
+ requested = new FrameLayout.LayoutParams(LayoutParams.MATCH_PARENT,
+ LayoutParams.MATCH_PARENT);
}
requested.gravity = Gravity.CENTER;
diff --git a/core/java/android/content/package.html b/core/java/android/content/package.html
index dd5360f..eac679d 100644
--- a/core/java/android/content/package.html
+++ b/core/java/android/content/package.html
@@ -421,7 +421,7 @@ can supply them explicitly in the XML file:</p>
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;root&gt;
&lt;EditText id="text"
- android:layout_width="fill_parent" android:layout_height="fill_parent"
+ android:layout_width="match_parent" android:layout_height="match_parent"
<b>android:textSize="18" android:textColor="#008"</b>
android:text="Hello, World!" /&gt;
&lt;/root&gt;
@@ -447,7 +447,7 @@ one of those resources:</p>
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;root&gt;
&lt;EditText id="text"
- android:layout_width="fill_parent" android:layout_height="fill_parent"
+ android:layout_width="match_parent" android:layout_height="match_parent"
<b>android:textColor="@color/opaque_red"</b>
android:text="Hello, World!" /&gt;
&lt;/root&gt;
@@ -463,7 +463,7 @@ reference a system resource, you would need to write:</p>
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;root&gt;
&lt;EditText id="text"
- android:layout_width="fill_parent" android:layout_height="fill_parent"
+ android:layout_width="match_parent" android:layout_height="match_parent"
android:textColor="@<b>android:</b>color/opaque_red"
android:text="Hello, World!" /&gt;
&lt;/root&gt;
@@ -476,7 +476,7 @@ strings in a layout file so that they can be localized:</p>
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;root&gt;
&lt;EditText id="text"
- android:layout_width="fill_parent" android:layout_height="fill_parent"
+ android:layout_width="match_parent" android:layout_height="match_parent"
android:textColor="@android:color/opaque_red"
android:text="@string/hello_world" /&gt;
&lt;/root&gt;
@@ -509,7 +509,7 @@ one of the standard colors defined in the base system theme:</p>
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;root&gt;
&lt;EditText id="text"
- android:layout_width="fill_parent" android:layout_height="fill_parent"
+ android:layout_width="match_parent" android:layout_height="match_parent"
<b>android:textColor="?android:textDisabledColor"</b>
android:text="@string/hello_world" /&gt;
&lt;/root&gt;
@@ -637,10 +637,10 @@ new style resource with the desired values:</p>
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;root&gt;
&lt;EditText id="text1" <b>style="@style/SpecialText"</b>
- android:layout_width="fill_parent" android:layout_height="wrap_content"
+ android:layout_width="match_parent" android:layout_height="wrap_content"
android:text="Hello, World!" /&gt;
&lt;EditText id="text2" <b>style="@style/SpecialText"</b>
- android:layout_width="fill_parent" android:layout_height="wrap_content"
+ android:layout_width="match_parent" android:layout_height="wrap_content"
android:text="I love you all." /&gt;
&lt;/root&gt;</pre>
<h4>&nbsp;</h4>
diff --git a/core/java/android/inputmethodservice/InputMethodService.java b/core/java/android/inputmethodservice/InputMethodService.java
index 5499bba..b315932 100644
--- a/core/java/android/inputmethodservice/InputMethodService.java
+++ b/core/java/android/inputmethodservice/InputMethodService.java
@@ -16,7 +16,7 @@
package android.inputmethodservice;
-import static android.view.ViewGroup.LayoutParams.FILL_PARENT;
+import static android.view.ViewGroup.LayoutParams.MATCH_PARENT;
import static android.view.ViewGroup.LayoutParams.WRAP_CONTENT;
import android.app.Dialog;
@@ -556,7 +556,7 @@ public class InputMethodService extends AbstractInputMethodService {
Context.LAYOUT_INFLATER_SERVICE);
mWindow = new SoftInputWindow(this, mTheme, mDispatcherState);
initViews();
- mWindow.getWindow().setLayout(FILL_PARENT, WRAP_CONTENT);
+ mWindow.getWindow().setLayout(MATCH_PARENT, WRAP_CONTENT);
}
/**
@@ -803,8 +803,8 @@ public class InputMethodService extends AbstractInputMethodService {
* candidates only mode changes.
*
* <p>The default implementation makes the layout for the window
- * FILL_PARENT x FILL_PARENT when in fullscreen mode, and
- * FILL_PARENT x WRAP_CONTENT when in non-fullscreen mode.
+ * MATCH_PARENT x MATCH_PARENT when in fullscreen mode, and
+ * MATCH_PARENT x WRAP_CONTENT when in non-fullscreen mode.
*
* @param win The input method's window.
* @param isFullscreen If true, the window is running in fullscreen mode
@@ -816,9 +816,9 @@ public class InputMethodService extends AbstractInputMethodService {
public void onConfigureWindow(Window win, boolean isFullscreen,
boolean isCandidatesOnly) {
if (isFullscreen) {
- mWindow.getWindow().setLayout(FILL_PARENT, FILL_PARENT);
+ mWindow.getWindow().setLayout(MATCH_PARENT, MATCH_PARENT);
} else {
- mWindow.getWindow().setLayout(FILL_PARENT, WRAP_CONTENT);
+ mWindow.getWindow().setLayout(MATCH_PARENT, WRAP_CONTENT);
}
}
@@ -1049,8 +1049,8 @@ public class InputMethodService extends AbstractInputMethodService {
public void setExtractView(View view) {
mExtractFrame.removeAllViews();
mExtractFrame.addView(view, new FrameLayout.LayoutParams(
- ViewGroup.LayoutParams.FILL_PARENT,
- ViewGroup.LayoutParams.FILL_PARENT));
+ ViewGroup.LayoutParams.MATCH_PARENT,
+ ViewGroup.LayoutParams.MATCH_PARENT));
mExtractView = view;
if (view != null) {
mExtractEditText = (ExtractEditText)view.findViewById(
@@ -1079,7 +1079,7 @@ public class InputMethodService extends AbstractInputMethodService {
public void setCandidatesView(View view) {
mCandidatesFrame.removeAllViews();
mCandidatesFrame.addView(view, new FrameLayout.LayoutParams(
- ViewGroup.LayoutParams.FILL_PARENT,
+ ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT));
}
@@ -1092,7 +1092,7 @@ public class InputMethodService extends AbstractInputMethodService {
public void setInputView(View view) {
mInputFrame.removeAllViews();
mInputFrame.addView(view, new FrameLayout.LayoutParams(
- ViewGroup.LayoutParams.FILL_PARENT,
+ ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT));
mInputView = view;
}
diff --git a/core/java/android/preference/EditTextPreference.java b/core/java/android/preference/EditTextPreference.java
index 84ee950..aa27627 100644
--- a/core/java/android/preference/EditTextPreference.java
+++ b/core/java/android/preference/EditTextPreference.java
@@ -28,7 +28,6 @@ import android.view.View;
import android.view.ViewGroup;
import android.view.ViewParent;
import android.widget.EditText;
-import android.widget.LinearLayout;
/**
* A {@link Preference} that allows for string
@@ -128,7 +127,7 @@ public class EditTextPreference extends DialogPreference {
ViewGroup container = (ViewGroup) dialogView
.findViewById(com.android.internal.R.id.edittext_container);
if (container != null) {
- container.addView(editText, ViewGroup.LayoutParams.FILL_PARENT,
+ container.addView(editText, ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT);
}
}
diff --git a/core/java/android/service/wallpaper/WallpaperService.java b/core/java/android/service/wallpaper/WallpaperService.java
index 45719e4..fe3b149 100644
--- a/core/java/android/service/wallpaper/WallpaperService.java
+++ b/core/java/android/service/wallpaper/WallpaperService.java
@@ -434,9 +434,9 @@ public abstract class WallpaperService extends Service {
}
int myWidth = mSurfaceHolder.getRequestedWidth();
- if (myWidth <= 0) myWidth = ViewGroup.LayoutParams.FILL_PARENT;
+ if (myWidth <= 0) myWidth = ViewGroup.LayoutParams.MATCH_PARENT;
int myHeight = mSurfaceHolder.getRequestedHeight();
- if (myHeight <= 0) myHeight = ViewGroup.LayoutParams.FILL_PARENT;
+ if (myHeight <= 0) myHeight = ViewGroup.LayoutParams.MATCH_PARENT;
final boolean creating = !mCreated;
final boolean formatChanged = mFormat != mSurfaceHolder.getRequestedFormat();
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index 5bd45a66a..df4cab0 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -379,7 +379,7 @@ import java.util.WeakHashMap;
* dimension, it can specify one of:
* <ul>
* <li> an exact number
- * <li>FILL_PARENT, which means the view wants to be as big as its parent
+ * <li>MATCH_PARENT, which means the view wants to be as big as its parent
* (minus padding)
* <li> WRAP_CONTENT, which means that the view wants to be just big enough to
* enclose its content (plus padding).
diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java
index 6646136..763f273 100644
--- a/core/java/android/view/ViewGroup.java
+++ b/core/java/android/view/ViewGroup.java
@@ -3070,7 +3070,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
if (childDimension >= 0) {
resultSize = childDimension;
resultMode = MeasureSpec.EXACTLY;
- } else if (childDimension == LayoutParams.FILL_PARENT) {
+ } else if (childDimension == LayoutParams.MATCH_PARENT) {
// Child wants to be our size. So be it.
resultSize = size;
resultMode = MeasureSpec.EXACTLY;
@@ -3088,7 +3088,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
// Child wants a specific size... so be it
resultSize = childDimension;
resultMode = MeasureSpec.EXACTLY;
- } else if (childDimension == LayoutParams.FILL_PARENT) {
+ } else if (childDimension == LayoutParams.MATCH_PARENT) {
// Child wants to be our size, but our size is not fixed.
// Constrain child to not be bigger than us.
resultSize = size;
@@ -3107,7 +3107,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
// Child wants a specific size... let him have it
resultSize = childDimension;
resultMode = MeasureSpec.EXACTLY;
- } else if (childDimension == LayoutParams.FILL_PARENT) {
+ } else if (childDimension == LayoutParams.MATCH_PARENT) {
// Child wants to be our size... find out how big it should
// be
resultSize = 0;
@@ -3362,7 +3362,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
* for both width and height. For each dimension, it can specify one of:
* <ul>
* <li> an exact number
- * <li>FILL_PARENT, which means the view wants to be as big as its parent
+ * <li>MATCH_PARENT, which means the view wants to be as big as its parent
* (minus padding)
* <li> WRAP_CONTENT, which means that the view wants to be just big enough
* to enclose its content (plus padding)
@@ -3376,14 +3376,22 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
*/
public static class LayoutParams {
/**
- * Special value for the height or width requested by a View.
- * FILL_PARENT means that the view wants to fill the available space
- * within the parent, taking the parent's padding into account.
+ * This value has the same meaning as {@link #MATCH_PARENT} but has
+ * been deprecated.
*/
+ @SuppressWarnings({"UnusedDeclaration"})
+ @Deprecated
public static final int FILL_PARENT = -1;
/**
* Special value for the height or width requested by a View.
+ * MATCH_PARENT means that the view wants to be as bigas its parent,
+ * minus the parent's padding, if any.
+ */
+ public static final int MATCH_PARENT = -1;
+
+ /**
+ * Special value for the height or width requested by a View.
* WRAP_CONTENT means that the view wants to be just large enough to fit
* its own internal content, taking its own padding into account.
*/
@@ -3391,20 +3399,20 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
/**
* Information about how wide the view wants to be. Can be an exact
- * size, or one of the constants FILL_PARENT or WRAP_CONTENT.
+ * size, or one of the constants MATCH_PARENT or WRAP_CONTENT.
*/
@ViewDebug.ExportedProperty(mapping = {
- @ViewDebug.IntToString(from = FILL_PARENT, to = "FILL_PARENT"),
+ @ViewDebug.IntToString(from = MATCH_PARENT, to = "MATCH_PARENT"),
@ViewDebug.IntToString(from = WRAP_CONTENT, to = "WRAP_CONTENT")
})
public int width;
/**
* Information about how tall the view wants to be. Can be an exact
- * size, or one of the constants FILL_PARENT or WRAP_CONTENT.
+ * size, or one of the constants MATCH_PARENT or WRAP_CONTENT.
*/
@ViewDebug.ExportedProperty(mapping = {
- @ViewDebug.IntToString(from = FILL_PARENT, to = "FILL_PARENT"),
+ @ViewDebug.IntToString(from = MATCH_PARENT, to = "MATCH_PARENT"),
@ViewDebug.IntToString(from = WRAP_CONTENT, to = "WRAP_CONTENT")
})
public int height;
@@ -3421,9 +3429,9 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
*
* <ul>
* <li><code>layout_width</code>: the width, either an exact value,
- * {@link #WRAP_CONTENT} or {@link #FILL_PARENT}</li>
+ * {@link #WRAP_CONTENT} or {@link #MATCH_PARENT}</li>
* <li><code>layout_height</code>: the height, either an exact value,
- * {@link #WRAP_CONTENT} or {@link #FILL_PARENT}</li>
+ * {@link #WRAP_CONTENT} or {@link #MATCH_PARENT}</li>
* </ul>
*
* @param c the application environment
@@ -3442,9 +3450,9 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
* Creates a new set of layout parameters with the specified width
* and height.
*
- * @param width the width, either {@link #FILL_PARENT},
+ * @param width the width, either {@link #MATCH_PARENT},
* {@link #WRAP_CONTENT} or a fixed size in pixels
- * @param height the height, either {@link #FILL_PARENT},
+ * @param height the height, either {@link #MATCH_PARENT},
* {@link #WRAP_CONTENT} or a fixed size in pixels
*/
public LayoutParams(int width, int height) {
@@ -3507,8 +3515,8 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
if (size == WRAP_CONTENT) {
return "wrap-content";
}
- if (size == FILL_PARENT) {
- return "fill-parent";
+ if (size == MATCH_PARENT) {
+ return "match-parent";
}
return String.valueOf(size);
}
diff --git a/core/java/android/view/ViewRoot.java b/core/java/android/view/ViewRoot.java
index 47b976b..094b7dd 100644
--- a/core/java/android/view/ViewRoot.java
+++ b/core/java/android/view/ViewRoot.java
@@ -1167,7 +1167,7 @@ public final class ViewRoot extends Handler implements ViewParent,
int measureSpec;
switch (rootDimension) {
- case ViewGroup.LayoutParams.FILL_PARENT:
+ case ViewGroup.LayoutParams.MATCH_PARENT:
// Window can't resize. Force root view to be windowSize.
measureSpec = MeasureSpec.makeMeasureSpec(windowSize, MeasureSpec.EXACTLY);
break;
diff --git a/core/java/android/view/Window.java b/core/java/android/view/Window.java
index 1932765..7dd5085 100644
--- a/core/java/android/view/Window.java
+++ b/core/java/android/view/Window.java
@@ -484,7 +484,7 @@ public abstract class Window {
/**
* Set the width and height layout parameters of the window. The default
- * for both of these is FILL_PARENT; you can change them to WRAP_CONTENT to
+ * for both of these is MATCH_PARENT; you can change them to WRAP_CONTENT to
* make a window that is not full-screen.
*
* @param width The desired layout width of the window.
diff --git a/core/java/android/view/WindowManager.java b/core/java/android/view/WindowManager.java
index fe329f2..8e15f89 100644
--- a/core/java/android/view/WindowManager.java
+++ b/core/java/android/view/WindowManager.java
@@ -771,26 +771,26 @@ public interface WindowManager extends ViewManager {
public LayoutParams() {
- super(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT);
+ super(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
type = TYPE_APPLICATION;
format = PixelFormat.OPAQUE;
}
public LayoutParams(int _type) {
- super(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT);
+ super(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
type = _type;
format = PixelFormat.OPAQUE;
}
public LayoutParams(int _type, int _flags) {
- super(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT);
+ super(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
type = _type;
flags = _flags;
format = PixelFormat.OPAQUE;
}
public LayoutParams(int _type, int _flags, int _format) {
- super(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT);
+ super(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
type = _type;
flags = _flags;
format = _format;
@@ -1036,9 +1036,9 @@ public interface WindowManager extends ViewManager {
sb.append(',');
sb.append(y);
sb.append(")(");
- sb.append((width==FILL_PARENT?"fill":(width==WRAP_CONTENT?"wrap":width)));
+ sb.append((width== MATCH_PARENT ?"fill":(width==WRAP_CONTENT?"wrap":width)));
sb.append('x');
- sb.append((height==FILL_PARENT?"fill":(height==WRAP_CONTENT?"wrap":height)));
+ sb.append((height== MATCH_PARENT ?"fill":(height==WRAP_CONTENT?"wrap":height)));
sb.append(")");
if (softInputMode != 0) {
sb.append(" sim=#");
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index 821f2bf..9d658bd 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -25,11 +25,9 @@ import android.database.DataSetObserver;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
-import android.graphics.Paint;
import android.graphics.Picture;
import android.graphics.Point;
import android.graphics.Rect;
-import android.graphics.Region;
import android.graphics.drawable.Drawable;
import android.net.http.SslCertificate;
import android.net.Uri;
@@ -55,7 +53,6 @@ import android.view.VelocityTracker;
import android.view.View;
import android.view.ViewConfiguration;
import android.view.ViewGroup;
-import android.view.ViewParent;
import android.view.ViewTreeObserver;
import android.view.animation.AlphaAnimation;
import android.view.inputmethod.InputMethodManager;
@@ -1849,7 +1846,7 @@ public class WebView extends AbsoluteLayout
}
if (null != v) {
addView(v, new AbsoluteLayout.LayoutParams(
- ViewGroup.LayoutParams.FILL_PARENT,
+ ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT, 0, 0));
if (mTitleShadow == null) {
mTitleShadow = (Drawable) mContext.getResources().getDrawable(
diff --git a/core/java/android/widget/AbsSpinner.java b/core/java/android/widget/AbsSpinner.java
index 424a936..c939e3f 100644
--- a/core/java/android/widget/AbsSpinner.java
+++ b/core/java/android/widget/AbsSpinner.java
@@ -249,7 +249,7 @@ public abstract class AbsSpinner extends AdapterView<SpinnerAdapter> {
@Override
protected ViewGroup.LayoutParams generateDefaultLayoutParams() {
return new ViewGroup.LayoutParams(
- ViewGroup.LayoutParams.FILL_PARENT,
+ ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT);
}
diff --git a/core/java/android/widget/AbsoluteLayout.java b/core/java/android/widget/AbsoluteLayout.java
index c77f7ae..b829655 100644
--- a/core/java/android/widget/AbsoluteLayout.java
+++ b/core/java/android/widget/AbsoluteLayout.java
@@ -161,9 +161,9 @@ public class AbsoluteLayout extends ViewGroup {
* Creates a new set of layout parameters with the specified width,
* height and location.
*
- * @param width the width, either {@link #FILL_PARENT},
+ * @param width the width, either {@link #MATCH_PARENT},
{@link #WRAP_CONTENT} or a fixed size in pixels
- * @param height the height, either {@link #FILL_PARENT},
+ * @param height the height, either {@link #MATCH_PARENT},
{@link #WRAP_CONTENT} or a fixed size in pixels
* @param x the X location of the child
* @param y the Y location of the child
diff --git a/core/java/android/widget/AutoCompleteTextView.java b/core/java/android/widget/AutoCompleteTextView.java
index b455d47..bb9a672 100644
--- a/core/java/android/widget/AutoCompleteTextView.java
+++ b/core/java/android/widget/AutoCompleteTextView.java
@@ -172,7 +172,7 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe
mDropDownAnchorId = a.getResourceId(R.styleable.AutoCompleteTextView_dropDownAnchor,
View.NO_ID);
- // For dropdown width, the developer can specify a specific width, or FILL_PARENT
+ // For dropdown width, the developer can specify a specific width, or MATCH_PARENT
// (for full screen width) or WRAP_CONTENT (to match the width of the anchored view).
mDropDownWidth = a.getLayoutDimension(R.styleable.AutoCompleteTextView_dropDownWidth,
ViewGroup.LayoutParams.WRAP_CONTENT);
@@ -240,7 +240,7 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe
/**
* <p>Returns the current width for the auto-complete drop down list. This can
- * be a fixed width, or {@link ViewGroup.LayoutParams#FILL_PARENT} to fill the screen, or
+ * be a fixed width, or {@link ViewGroup.LayoutParams#MATCH_PARENT} to fill the screen, or
* {@link ViewGroup.LayoutParams#WRAP_CONTENT} to fit the width of its anchor view.</p>
*
* @return the width for the drop down list
@@ -253,7 +253,7 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe
/**
* <p>Sets the current width for the auto-complete drop down list. This can
- * be a fixed width, or {@link ViewGroup.LayoutParams#FILL_PARENT} to fill the screen, or
+ * be a fixed width, or {@link ViewGroup.LayoutParams#MATCH_PARENT} to fill the screen, or
* {@link ViewGroup.LayoutParams#WRAP_CONTENT} to fit the width of its anchor view.</p>
*
* @param width the width to use
@@ -266,7 +266,7 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe
/**
* <p>Returns the current height for the auto-complete drop down list. This can
- * be a fixed height, or {@link ViewGroup.LayoutParams#FILL_PARENT} to fill
+ * be a fixed height, or {@link ViewGroup.LayoutParams#MATCH_PARENT} to fill
* the screen, or {@link ViewGroup.LayoutParams#WRAP_CONTENT} to fit the height
* of the drop down's content.</p>
*
@@ -280,7 +280,7 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe
/**
* <p>Sets the current height for the auto-complete drop down list. This can
- * be a fixed height, or {@link ViewGroup.LayoutParams#FILL_PARENT} to fill
+ * be a fixed height, or {@link ViewGroup.LayoutParams#MATCH_PARENT} to fill
* the screen, or {@link ViewGroup.LayoutParams#WRAP_CONTENT} to fit the height
* of the drop down's content.</p>
*
@@ -1129,7 +1129,7 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe
boolean noInputMethod = isInputMethodNotNeeded();
if (mPopup.isShowing()) {
- if (mDropDownWidth == ViewGroup.LayoutParams.FILL_PARENT) {
+ if (mDropDownWidth == ViewGroup.LayoutParams.MATCH_PARENT) {
// The call to PopupWindow's update method below can accept -1 for any
// value you do not want to update.
widthSpec = -1;
@@ -1139,19 +1139,19 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe
widthSpec = mDropDownWidth;
}
- if (mDropDownHeight == ViewGroup.LayoutParams.FILL_PARENT) {
+ if (mDropDownHeight == ViewGroup.LayoutParams.MATCH_PARENT) {
// The call to PopupWindow's update method below can accept -1 for any
// value you do not want to update.
- heightSpec = noInputMethod ? height : ViewGroup.LayoutParams.FILL_PARENT;
+ heightSpec = noInputMethod ? height : ViewGroup.LayoutParams.MATCH_PARENT;
if (noInputMethod) {
mPopup.setWindowLayoutMode(
- mDropDownWidth == ViewGroup.LayoutParams.FILL_PARENT ?
- ViewGroup.LayoutParams.FILL_PARENT : 0, 0);
+ mDropDownWidth == ViewGroup.LayoutParams.MATCH_PARENT ?
+ ViewGroup.LayoutParams.MATCH_PARENT : 0, 0);
} else {
mPopup.setWindowLayoutMode(
- mDropDownWidth == ViewGroup.LayoutParams.FILL_PARENT ?
- ViewGroup.LayoutParams.FILL_PARENT : 0,
- ViewGroup.LayoutParams.FILL_PARENT);
+ mDropDownWidth == ViewGroup.LayoutParams.MATCH_PARENT ?
+ ViewGroup.LayoutParams.MATCH_PARENT : 0,
+ ViewGroup.LayoutParams.MATCH_PARENT);
}
} else if (mDropDownHeight == ViewGroup.LayoutParams.WRAP_CONTENT) {
heightSpec = height;
@@ -1164,8 +1164,8 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe
mPopup.update(getDropDownAnchorView(), mDropDownHorizontalOffset,
mDropDownVerticalOffset, widthSpec, heightSpec);
} else {
- if (mDropDownWidth == ViewGroup.LayoutParams.FILL_PARENT) {
- widthSpec = ViewGroup.LayoutParams.FILL_PARENT;
+ if (mDropDownWidth == ViewGroup.LayoutParams.MATCH_PARENT) {
+ widthSpec = ViewGroup.LayoutParams.MATCH_PARENT;
} else {
if (mDropDownWidth == ViewGroup.LayoutParams.WRAP_CONTENT) {
mPopup.setWidth(getDropDownAnchorView().getWidth());
@@ -1174,8 +1174,8 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe
}
}
- if (mDropDownHeight == ViewGroup.LayoutParams.FILL_PARENT) {
- heightSpec = ViewGroup.LayoutParams.FILL_PARENT;
+ if (mDropDownHeight == ViewGroup.LayoutParams.MATCH_PARENT) {
+ heightSpec = ViewGroup.LayoutParams.MATCH_PARENT;
} else {
if (mDropDownHeight == ViewGroup.LayoutParams.WRAP_CONTENT) {
mPopup.setHeight(height);
@@ -1295,7 +1295,7 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe
hintContainer.setOrientation(LinearLayout.VERTICAL);
LinearLayout.LayoutParams hintParams = new LinearLayout.LayoutParams(
- ViewGroup.LayoutParams.FILL_PARENT, 0, 1.0f
+ ViewGroup.LayoutParams.MATCH_PARENT, 0, 1.0f
);
hintContainer.addView(dropDownView, hintParams);
hintContainer.addView(hintView);
@@ -1331,7 +1331,7 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe
final int maxHeight = mPopup.getMaxAvailableHeight(
getDropDownAnchorView(), mDropDownVerticalOffset, ignoreBottomDecorations);
- if (mDropDownAlwaysVisible || mDropDownHeight == ViewGroup.LayoutParams.FILL_PARENT) {
+ if (mDropDownAlwaysVisible || mDropDownHeight == ViewGroup.LayoutParams.MATCH_PARENT) {
// getMaxAvailableHeight() subtracts the padding, so we put it back,
// to get the available height for the whole window
int padding = 0;
diff --git a/core/java/android/widget/FrameLayout.java b/core/java/android/widget/FrameLayout.java
index 3afd5d4..65a4673 100644
--- a/core/java/android/widget/FrameLayout.java
+++ b/core/java/android/widget/FrameLayout.java
@@ -164,12 +164,12 @@ public class FrameLayout extends ViewGroup {
/**
* Returns a set of layout parameters with a width of
- * {@link android.view.ViewGroup.LayoutParams#FILL_PARENT},
- * and a height of {@link android.view.ViewGroup.LayoutParams#FILL_PARENT}.
+ * {@link android.view.ViewGroup.LayoutParams#MATCH_PARENT},
+ * and a height of {@link android.view.ViewGroup.LayoutParams#MATCH_PARENT}.
*/
@Override
protected LayoutParams generateDefaultLayoutParams() {
- return new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT);
+ return new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
}
/**
@@ -467,9 +467,9 @@ public class FrameLayout extends ViewGroup {
* Creates a new set of layout parameters with the specified width, height
* and weight.
*
- * @param width the width, either {@link #FILL_PARENT},
+ * @param width the width, either {@link #MATCH_PARENT},
* {@link #WRAP_CONTENT} or a fixed size in pixels
- * @param height the height, either {@link #FILL_PARENT},
+ * @param height the height, either {@link #MATCH_PARENT},
* {@link #WRAP_CONTENT} or a fixed size in pixels
* @param gravity the gravity
*
diff --git a/core/java/android/widget/GridView.java b/core/java/android/widget/GridView.java
index 2e91e52..30a38df 100644
--- a/core/java/android/widget/GridView.java
+++ b/core/java/android/widget/GridView.java
@@ -935,7 +935,7 @@ public class GridView extends AbsListView {
AbsListView.LayoutParams p = (AbsListView.LayoutParams)child.getLayoutParams();
if (p == null) {
- p = new AbsListView.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT,
+ p = new AbsListView.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT, 0);
child.setLayoutParams(p);
}
@@ -1254,7 +1254,7 @@ public class GridView extends AbsListView {
// some up...
AbsListView.LayoutParams p = (AbsListView.LayoutParams)child.getLayoutParams();
if (p == null) {
- p = new AbsListView.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT,
+ p = new AbsListView.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT, 0);
}
p.viewType = mAdapter.getItemViewType(position);
diff --git a/core/java/android/widget/LinearLayout.java b/core/java/android/widget/LinearLayout.java
index f49079c..37372c5 100644
--- a/core/java/android/widget/LinearLayout.java
+++ b/core/java/android/widget/LinearLayout.java
@@ -378,7 +378,7 @@ public class LinearLayout extends ViewGroup {
}
boolean matchWidthLocally = false;
- if (widthMode != MeasureSpec.EXACTLY && lp.width == LayoutParams.FILL_PARENT) {
+ if (widthMode != MeasureSpec.EXACTLY && lp.width == LayoutParams.MATCH_PARENT) {
// The width of the linear layout will scale, and at least one
// child said it wanted to match our width. Set a flag
// indicating that we need to remeasure at least that view when
@@ -391,7 +391,7 @@ public class LinearLayout extends ViewGroup {
final int measuredWidth = child.getMeasuredWidth() + margin;
maxWidth = Math.max(maxWidth, measuredWidth);
- allFillParent = allFillParent && lp.width == LayoutParams.FILL_PARENT;
+ allFillParent = allFillParent && lp.width == LayoutParams.MATCH_PARENT;
if (lp.weight > 0) {
/*
* Widths of weighted Views are bogus if we end up
@@ -472,12 +472,12 @@ public class LinearLayout extends ViewGroup {
maxWidth = Math.max(maxWidth, measuredWidth);
boolean matchWidthLocally = widthMode != MeasureSpec.EXACTLY &&
- lp.width == LayoutParams.FILL_PARENT;
+ lp.width == LayoutParams.MATCH_PARENT;
alternativeMaxWidth = Math.max(alternativeMaxWidth,
matchWidthLocally ? margin : measuredWidth);
- allFillParent = allFillParent && lp.width == LayoutParams.FILL_PARENT;
+ allFillParent = allFillParent && lp.width == LayoutParams.MATCH_PARENT;
mTotalLength += child.getMeasuredHeight() + lp.topMargin +
lp.bottomMargin + getNextLocationOffset(child);
@@ -515,7 +515,7 @@ public class LinearLayout extends ViewGroup {
if (child.getVisibility() != GONE) {
LinearLayout.LayoutParams lp = ((LinearLayout.LayoutParams)child.getLayoutParams());
- if (lp.width == LayoutParams.FILL_PARENT) {
+ if (lp.width == LayoutParams.MATCH_PARENT) {
// Temporarily force children to reuse their old measured height
// FIXME: this may not be right for something like wrapping text?
int oldHeight = lp.height;
@@ -629,7 +629,7 @@ public class LinearLayout extends ViewGroup {
}
boolean matchHeightLocally = false;
- if (heightMode != MeasureSpec.EXACTLY && lp.height == LayoutParams.FILL_PARENT) {
+ if (heightMode != MeasureSpec.EXACTLY && lp.height == LayoutParams.MATCH_PARENT) {
// The height of the linear layout will scale, and at least one
// child said it wanted to match our height. Set a flag indicating that
// we need to remeasure at least that view when we know our height.
@@ -657,7 +657,7 @@ public class LinearLayout extends ViewGroup {
maxHeight = Math.max(maxHeight, childHeight);
- allFillParent = allFillParent && lp.height == LayoutParams.FILL_PARENT;
+ allFillParent = allFillParent && lp.height == LayoutParams.MATCH_PARENT;
if (lp.weight > 0) {
/*
* Heights of weighted Views are bogus if we end up
@@ -758,7 +758,7 @@ public class LinearLayout extends ViewGroup {
lp.rightMargin + getNextLocationOffset(child);
boolean matchHeightLocally = heightMode != MeasureSpec.EXACTLY &&
- lp.height == LayoutParams.FILL_PARENT;
+ lp.height == LayoutParams.MATCH_PARENT;
final int margin = lp.topMargin + lp .bottomMargin;
int childHeight = child.getMeasuredHeight() + margin;
@@ -766,7 +766,7 @@ public class LinearLayout extends ViewGroup {
alternativeMaxHeight = Math.max(alternativeMaxHeight,
matchHeightLocally ? margin : childHeight);
- allFillParent = allFillParent && lp.height == LayoutParams.FILL_PARENT;
+ allFillParent = allFillParent && lp.height == LayoutParams.MATCH_PARENT;
if (baselineAligned) {
final int childBaseline = child.getBaseline();
@@ -832,7 +832,7 @@ public class LinearLayout extends ViewGroup {
if (child.getVisibility() != GONE) {
LinearLayout.LayoutParams lp = (LinearLayout.LayoutParams) child.getLayoutParams();
- if (lp.height == LayoutParams.FILL_PARENT) {
+ if (lp.height == LayoutParams.MATCH_PARENT) {
// Temporarily force children to reuse their old measured width
// FIXME: this may not be right for something like wrapping text?
int oldWidth = lp.width;
@@ -1065,7 +1065,7 @@ public class LinearLayout extends ViewGroup {
final LinearLayout.LayoutParams lp =
(LinearLayout.LayoutParams) child.getLayoutParams();
- if (baselineAligned && lp.height != LayoutParams.FILL_PARENT) {
+ if (baselineAligned && lp.height != LayoutParams.MATCH_PARENT) {
childBaseline = child.getBaseline();
}
@@ -1199,7 +1199,7 @@ public class LinearLayout extends ViewGroup {
/**
* Returns a set of layout parameters with a width of
- * {@link android.view.ViewGroup.LayoutParams#FILL_PARENT}
+ * {@link android.view.ViewGroup.LayoutParams#MATCH_PARENT}
* and a height of {@link android.view.ViewGroup.LayoutParams#WRAP_CONTENT}
* when the layout's orientation is {@link #VERTICAL}. When the orientation is
* {@link #HORIZONTAL}, the width is set to {@link LayoutParams#WRAP_CONTENT}
@@ -1210,7 +1210,7 @@ public class LinearLayout extends ViewGroup {
if (mOrientation == HORIZONTAL) {
return new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
} else if (mOrientation == VERTICAL) {
- return new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT);
+ return new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
}
return null;
}
@@ -1290,9 +1290,9 @@ public class LinearLayout extends ViewGroup {
* Creates a new set of layout parameters with the specified width, height
* and weight.
*
- * @param width the width, either {@link #FILL_PARENT},
+ * @param width the width, either {@link #MATCH_PARENT},
* {@link #WRAP_CONTENT} or a fixed size in pixels
- * @param height the height, either {@link #FILL_PARENT},
+ * @param height the height, either {@link #MATCH_PARENT},
* {@link #WRAP_CONTENT} or a fixed size in pixels
* @param weight the weight
*/
diff --git a/core/java/android/widget/ListView.java b/core/java/android/widget/ListView.java
index f4008f9..c63774a 100644
--- a/core/java/android/widget/ListView.java
+++ b/core/java/android/widget/ListView.java
@@ -1067,7 +1067,7 @@ public class ListView extends AbsListView {
private void measureScrapChild(View child, int position, int widthMeasureSpec) {
LayoutParams p = (LayoutParams) child.getLayoutParams();
if (p == null) {
- p = new LayoutParams(ViewGroup.LayoutParams.FILL_PARENT,
+ p = new LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT, 0);
child.setLayoutParams(p);
}
@@ -1702,7 +1702,7 @@ public class ListView extends AbsListView {
// noinspection unchecked
AbsListView.LayoutParams p = (AbsListView.LayoutParams) child.getLayoutParams();
if (p == null) {
- p = new AbsListView.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT,
+ p = new AbsListView.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT, 0);
}
p.viewType = mAdapter.getItemViewType(position);
@@ -2388,7 +2388,7 @@ public class ListView extends AbsListView {
ViewGroup.LayoutParams p = child.getLayoutParams();
if (p == null) {
p = new ViewGroup.LayoutParams(
- ViewGroup.LayoutParams.FILL_PARENT,
+ ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT);
}
diff --git a/core/java/android/widget/MediaController.java b/core/java/android/widget/MediaController.java
index 446a992..c246c247 100644
--- a/core/java/android/widget/MediaController.java
+++ b/core/java/android/widget/MediaController.java
@@ -167,8 +167,8 @@ public class MediaController extends FrameLayout {
mAnchor = view;
FrameLayout.LayoutParams frameParams = new FrameLayout.LayoutParams(
- ViewGroup.LayoutParams.FILL_PARENT,
- ViewGroup.LayoutParams.FILL_PARENT
+ ViewGroup.LayoutParams.MATCH_PARENT,
+ ViewGroup.LayoutParams.MATCH_PARENT
);
removeAllViews();
diff --git a/core/java/android/widget/PopupWindow.java b/core/java/android/widget/PopupWindow.java
index e4cc609..d20ab3b 100644
--- a/core/java/android/widget/PopupWindow.java
+++ b/core/java/android/widget/PopupWindow.java
@@ -569,7 +569,7 @@ public class PopupWindow {
* the current width or height is requested as an explicit size from
* the window manager. You can supply
* {@link ViewGroup.LayoutParams#WRAP_CONTENT} or
- * {@link ViewGroup.LayoutParams#FILL_PARENT} to have that measure
+ * {@link ViewGroup.LayoutParams#MATCH_PARENT} to have that measure
* spec supplied instead, replacing the absolute width and height that
* has been set in the popup.</p>
*
@@ -578,11 +578,11 @@ public class PopupWindow {
*
* @param widthSpec an explicit width measure spec mode, either
* {@link ViewGroup.LayoutParams#WRAP_CONTENT},
- * {@link ViewGroup.LayoutParams#FILL_PARENT}, or 0 to use the absolute
+ * {@link ViewGroup.LayoutParams#MATCH_PARENT}, or 0 to use the absolute
* width.
* @param heightSpec an explicit height measure spec mode, either
* {@link ViewGroup.LayoutParams#WRAP_CONTENT},
- * {@link ViewGroup.LayoutParams#FILL_PARENT}, or 0 to use the absolute
+ * {@link ViewGroup.LayoutParams#MATCH_PARENT}, or 0 to use the absolute
* height.
*/
public void setWindowLayoutMode(int widthSpec, int heightSpec) {
@@ -785,7 +785,7 @@ public class PopupWindow {
if (mBackground != null) {
final ViewGroup.LayoutParams layoutParams = mContentView.getLayoutParams();
- int height = ViewGroup.LayoutParams.FILL_PARENT;
+ int height = ViewGroup.LayoutParams.MATCH_PARENT;
if (layoutParams != null &&
layoutParams.height == ViewGroup.LayoutParams.WRAP_CONTENT) {
height = ViewGroup.LayoutParams.WRAP_CONTENT;
@@ -795,7 +795,7 @@ public class PopupWindow {
// within another view that owns the background drawable
PopupViewContainer popupViewContainer = new PopupViewContainer(mContext);
PopupViewContainer.LayoutParams listParams = new PopupViewContainer.LayoutParams(
- ViewGroup.LayoutParams.FILL_PARENT, height
+ ViewGroup.LayoutParams.MATCH_PARENT, height
);
popupViewContainer.setBackgroundDrawable(mBackground);
popupViewContainer.addView(mContentView, listParams);
diff --git a/core/java/android/widget/RelativeLayout.java b/core/java/android/widget/RelativeLayout.java
index 533c607..fad994b 100644
--- a/core/java/android/widget/RelativeLayout.java
+++ b/core/java/android/widget/RelativeLayout.java
@@ -560,7 +560,7 @@ public class RelativeLayout extends ViewGroup {
mPaddingLeft, mPaddingRight,
myWidth);
int childHeightMeasureSpec;
- if (params.width == LayoutParams.FILL_PARENT) {
+ if (params.width == LayoutParams.MATCH_PARENT) {
childHeightMeasureSpec = MeasureSpec.makeMeasureSpec(myHeight, MeasureSpec.EXACTLY);
} else {
childHeightMeasureSpec = MeasureSpec.makeMeasureSpec(myHeight, MeasureSpec.AT_MOST);
@@ -622,7 +622,7 @@ public class RelativeLayout extends ViewGroup {
// We can grow in this dimension.
childSpecSize = childSize;
}
- } else if (childSize == LayoutParams.FILL_PARENT) {
+ } else if (childSize == LayoutParams.MATCH_PARENT) {
// Child wanted to be as big as possible. Give all availble
// space
childSpecMode = MeasureSpec.EXACTLY;
diff --git a/core/java/android/widget/SlidingDrawer.java b/core/java/android/widget/SlidingDrawer.java
index f706744..11d72de 100644
--- a/core/java/android/widget/SlidingDrawer.java
+++ b/core/java/android/widget/SlidingDrawer.java
@@ -43,7 +43,7 @@ import android.view.accessibility.AccessibilityEvent;
* SlidingDrawer should be used as an overlay inside layouts. This means SlidingDrawer
* should only be used inside of a FrameLayout or a RelativeLayout for instance. The
* size of the SlidingDrawer defines how much space the content will occupy once slid
- * out so SlidingDrawer should usually use fill_parent for both its dimensions.
+ * out so SlidingDrawer should usually use match_parent for both its dimensions.
*
* Inside an XML layout, SlidingDrawer must define the id of the handle and of the
* content:
@@ -51,8 +51,8 @@ import android.view.accessibility.AccessibilityEvent;
* <pre class="prettyprint">
* &lt;SlidingDrawer
* android:id="@+id/drawer"
- * android:layout_width="fill_parent"
- * android:layout_height="fill_parent"
+ * android:layout_width="match_parent"
+ * android:layout_height="match_parent"
*
* android:handle="@+id/handle"
* android:content="@+id/content"&gt;
@@ -64,8 +64,8 @@ import android.view.accessibility.AccessibilityEvent;
*
* &lt;GridView
* android:id="@id/content"
- * android:layout_width="fill_parent"
- * android:layout_height="fill_parent" /&gt;
+ * android:layout_width="match_parent"
+ * android:layout_height="match_parent" /&gt;
*
* &lt;/SlidingDrawer&gt;
* </pre>
diff --git a/core/java/android/widget/TabHost.java b/core/java/android/widget/TabHost.java
index 412f817..78e2fee 100644
--- a/core/java/android/widget/TabHost.java
+++ b/core/java/android/widget/TabHost.java
@@ -327,8 +327,8 @@ mTabHost.addTab(TAB_TAG_1, "Hello, world!", "Tab 1");
.addView(
mCurrentView,
new ViewGroup.LayoutParams(
- ViewGroup.LayoutParams.FILL_PARENT,
- ViewGroup.LayoutParams.FILL_PARENT));
+ ViewGroup.LayoutParams.MATCH_PARENT,
+ ViewGroup.LayoutParams.MATCH_PARENT));
}
if (!mTabWidget.hasFocus()) {
diff --git a/core/java/android/widget/TabWidget.java b/core/java/android/widget/TabWidget.java
index c12d098..aa47e6d 100644
--- a/core/java/android/widget/TabWidget.java
+++ b/core/java/android/widget/TabWidget.java
@@ -16,8 +16,6 @@
package android.widget;
-import com.android.internal.R;
-
import android.content.Context;
import android.content.res.Resources;
import android.content.res.TypedArray;
@@ -26,7 +24,6 @@ import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.util.AttributeSet;
-import android.util.Log;
import android.view.View;
import android.view.ViewGroup;
import android.view.View.OnFocusChangeListener;
@@ -313,7 +310,7 @@ public class TabWidget extends LinearLayout implements OnFocusChangeListener {
if (child.getLayoutParams() == null) {
final LinearLayout.LayoutParams lp = new LayoutParams(
0,
- ViewGroup.LayoutParams.FILL_PARENT, 1.0f);
+ ViewGroup.LayoutParams.MATCH_PARENT, 1.0f);
lp.setMargins(0, 0, 0, 0);
child.setLayoutParams(lp);
}
@@ -328,7 +325,7 @@ public class TabWidget extends LinearLayout implements OnFocusChangeListener {
ImageView divider = new ImageView(mContext);
final LinearLayout.LayoutParams lp = new LayoutParams(
mDividerDrawable.getIntrinsicWidth(),
- LayoutParams.FILL_PARENT);
+ LayoutParams.MATCH_PARENT);
lp.setMargins(0, 0, 0, 0);
divider.setLayoutParams(lp);
divider.setBackgroundDrawable(mDividerDrawable);
diff --git a/core/java/android/widget/TableLayout.java b/core/java/android/widget/TableLayout.java
index afa2f3b..66500a3 100644
--- a/core/java/android/widget/TableLayout.java
+++ b/core/java/android/widget/TableLayout.java
@@ -52,7 +52,7 @@ import java.util.regex.Pattern;
* {@link #setColumnCollapsed(int,boolean) setColumnCollapsed()}.</p>
*
* <p>The children of a TableLayout cannot specify the <code>layout_width</code>
- * attribute. Width is always <code>FILL_PARENT</code>. However, the
+ * attribute. Width is always <code>MATCH_PARENT</code>. However, the
* <code>layout_height</code> attribute can be defined by a child; default value
* is {@link android.widget.TableLayout.LayoutParams#WRAP_CONTENT}. If the child
* is a {@link android.widget.TableRow}, then the height is always
@@ -621,7 +621,7 @@ public class TableLayout extends LinearLayout {
/**
* Returns a set of layout parameters with a width of
- * {@link android.view.ViewGroup.LayoutParams#FILL_PARENT},
+ * {@link android.view.ViewGroup.LayoutParams#MATCH_PARENT},
* and a height of {@link android.view.ViewGroup.LayoutParams#WRAP_CONTENT}.
*/
@Override
@@ -647,7 +647,7 @@ public class TableLayout extends LinearLayout {
/**
* <p>This set of layout parameters enforces the width of each child to be
- * {@link #FILL_PARENT} and the height of each child to be
+ * {@link #MATCH_PARENT} and the height of each child to be
* {@link #WRAP_CONTENT}, but only if the height is not specified.</p>
*/
@SuppressWarnings({"UnusedDeclaration"})
@@ -663,14 +663,14 @@ public class TableLayout extends LinearLayout {
* {@inheritDoc}
*/
public LayoutParams(int w, int h) {
- super(FILL_PARENT, h);
+ super(MATCH_PARENT, h);
}
/**
* {@inheritDoc}
*/
public LayoutParams(int w, int h, float initWeight) {
- super(FILL_PARENT, h, initWeight);
+ super(MATCH_PARENT, h, initWeight);
}
/**
@@ -679,7 +679,7 @@ public class TableLayout extends LinearLayout {
* {@link android.view.ViewGroup.LayoutParams#WRAP_CONTENT}.</p>
*/
public LayoutParams() {
- super(FILL_PARENT, WRAP_CONTENT);
+ super(MATCH_PARENT, WRAP_CONTENT);
}
/**
@@ -698,7 +698,7 @@ public class TableLayout extends LinearLayout {
/**
* <p>Fixes the row's width to
- * {@link android.view.ViewGroup.LayoutParams#FILL_PARENT}; the row's
+ * {@link android.view.ViewGroup.LayoutParams#MATCH_PARENT}; the row's
* height is fixed to
* {@link android.view.ViewGroup.LayoutParams#WRAP_CONTENT} if no layout
* height is specified.</p>
@@ -710,7 +710,7 @@ public class TableLayout extends LinearLayout {
@Override
protected void setBaseAttributes(TypedArray a,
int widthAttr, int heightAttr) {
- this.width = FILL_PARENT;
+ this.width = MATCH_PARENT;
if (a.hasValue(heightAttr)) {
this.height = a.getLayoutDimension(heightAttr, "layout_height");
} else {
diff --git a/core/java/android/widget/TableRow.java b/core/java/android/widget/TableRow.java
index 5628cab..abf08bf 100644
--- a/core/java/android/widget/TableRow.java
+++ b/core/java/android/widget/TableRow.java
@@ -35,7 +35,7 @@ import android.view.ViewDebug;
* <p>The children of a TableRow do not need to specify the
* <code>layout_width</code> and <code>layout_height</code> attributes in the
* XML file. TableRow always enforces those values to be respectively
- * {@link android.widget.TableLayout.LayoutParams#FILL_PARENT} and
+ * {@link android.widget.TableLayout.LayoutParams#MATCH_PARENT} and
* {@link android.widget.TableLayout.LayoutParams#WRAP_CONTENT}.</p>
*
* <p>
@@ -299,7 +299,7 @@ public class TableRow extends LinearLayout {
case LayoutParams.WRAP_CONTENT:
spec = getChildMeasureSpec(widthMeasureSpec, 0, LayoutParams.WRAP_CONTENT);
break;
- case LayoutParams.FILL_PARENT:
+ case LayoutParams.MATCH_PARENT:
spec = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED);
break;
default:
@@ -351,7 +351,7 @@ public class TableRow extends LinearLayout {
/**
* Returns a set of layout parameters with a width of
- * {@link android.view.ViewGroup.LayoutParams#FILL_PARENT},
+ * {@link android.view.ViewGroup.LayoutParams#MATCH_PARENT},
* a height of {@link android.view.ViewGroup.LayoutParams#WRAP_CONTENT} and no spanning.
*/
@Override
@@ -451,7 +451,7 @@ public class TableRow extends LinearLayout {
* {@link android.view.ViewGroup.LayoutParams#WRAP_CONTENT}.</p>
*/
public LayoutParams() {
- super(FILL_PARENT, WRAP_CONTENT);
+ super(MATCH_PARENT, WRAP_CONTENT);
column = -1;
span = 1;
}
@@ -459,7 +459,7 @@ public class TableRow extends LinearLayout {
/**
* <p>Puts the view in the specified column.</p>
*
- * <p>Sets the child width to {@link android.view.ViewGroup.LayoutParams#FILL_PARENT}
+ * <p>Sets the child width to {@link android.view.ViewGroup.LayoutParams#MATCH_PARENT}
* and the child height to
* {@link android.view.ViewGroup.LayoutParams#WRAP_CONTENT}.</p>
*
@@ -490,7 +490,7 @@ public class TableRow extends LinearLayout {
if (a.hasValue(widthAttr)) {
width = a.getLayoutDimension(widthAttr, "layout_width");
} else {
- width = FILL_PARENT;
+ width = MATCH_PARENT;
}
// We don't want to force users to specify a layout_height
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index 455b593..12e8e29 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -4992,7 +4992,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
final int height = mLayoutParams.height;
// If the size of the view does not depend on the size of the text, try to
// start the marquee immediately
- if (height != LayoutParams.WRAP_CONTENT && height != LayoutParams.FILL_PARENT) {
+ if (height != LayoutParams.WRAP_CONTENT && height != LayoutParams.MATCH_PARENT) {
startMarquee();
} else {
// Defer the start of the marquee until we know our width (see setFrame())
@@ -5307,7 +5307,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
if (desiredHeight != this.getHeight()) {
sizeChanged = true;
}
- } else if (mLayoutParams.height == LayoutParams.FILL_PARENT) {
+ } else if (mLayoutParams.height == LayoutParams.MATCH_PARENT) {
if (mDesiredHeightAtMeasure >= 0) {
int desiredHeight = getDesiredHeight();
@@ -5354,7 +5354,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
if (mEllipsize != TextUtils.TruncateAt.MARQUEE) {
// In a fixed-height view, so use our new text layout.
if (mLayoutParams.height != LayoutParams.WRAP_CONTENT &&
- mLayoutParams.height != LayoutParams.FILL_PARENT) {
+ mLayoutParams.height != LayoutParams.MATCH_PARENT) {
invalidate();
return;
}
diff --git a/core/java/android/widget/ViewSwitcher.java b/core/java/android/widget/ViewSwitcher.java
index 0dcaf95..71ae624 100644
--- a/core/java/android/widget/ViewSwitcher.java
+++ b/core/java/android/widget/ViewSwitcher.java
@@ -80,7 +80,7 @@ public class ViewSwitcher extends ViewAnimator {
View child = mFactory.makeView();
LayoutParams lp = (LayoutParams) child.getLayoutParams();
if (lp == null) {
- lp = new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT);
+ lp = new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
}
addView(child, lp);
return child;
diff --git a/core/java/android/widget/ZoomButtonsController.java b/core/java/android/widget/ZoomButtonsController.java
index e55fbb8..bea009c 100644
--- a/core/java/android/widget/ZoomButtonsController.java
+++ b/core/java/android/widget/ZoomButtonsController.java
@@ -247,7 +247,7 @@ public class ZoomButtonsController implements View.OnTouchListener {
LayoutParams.FLAG_LAYOUT_NO_LIMITS |
LayoutParams.FLAG_ALT_FOCUSABLE_IM;
lp.height = LayoutParams.WRAP_CONTENT;
- lp.width = LayoutParams.FILL_PARENT;
+ lp.width = LayoutParams.MATCH_PARENT;
lp.type = LayoutParams.TYPE_APPLICATION_PANEL;
lp.format = PixelFormat.TRANSLUCENT;
lp.windowAnimations = com.android.internal.R.style.Animation_ZoomButtons;
diff --git a/core/java/com/android/internal/app/AlertController.java b/core/java/com/android/internal/app/AlertController.java
index 57dbb44..f56b15c 100644
--- a/core/java/com/android/internal/app/AlertController.java
+++ b/core/java/com/android/internal/app/AlertController.java
@@ -16,7 +16,7 @@
package com.android.internal.app;
-import static android.view.ViewGroup.LayoutParams.FILL_PARENT;
+import static android.view.ViewGroup.LayoutParams.MATCH_PARENT;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
@@ -361,7 +361,7 @@ public class AlertController {
if (mView != null) {
customPanel = (FrameLayout) mWindow.findViewById(R.id.customPanel);
FrameLayout custom = (FrameLayout) mWindow.findViewById(R.id.custom);
- custom.addView(mView, new LayoutParams(FILL_PARENT, FILL_PARENT));
+ custom.addView(mView, new LayoutParams(MATCH_PARENT, MATCH_PARENT));
if (mViewSpacingSpecified) {
custom.setPadding(mViewSpacingLeft, mViewSpacingTop, mViewSpacingRight,
mViewSpacingBottom);
@@ -391,7 +391,7 @@ public class AlertController {
if (mCustomTitleView != null) {
// Add the custom title view directly to the topPanel layout
LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(
- LinearLayout.LayoutParams.FILL_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);
+ LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);
topPanel.addView(mCustomTitleView, lp);
@@ -460,8 +460,8 @@ public class AlertController {
if (mListView != null) {
contentPanel.removeView(mWindow.findViewById(R.id.scrollView));
contentPanel.addView(mListView,
- new LinearLayout.LayoutParams(FILL_PARENT, FILL_PARENT));
- contentPanel.setLayoutParams(new LinearLayout.LayoutParams(FILL_PARENT, 0, 1.0f));
+ new LinearLayout.LayoutParams(MATCH_PARENT, MATCH_PARENT));
+ contentPanel.setLayoutParams(new LinearLayout.LayoutParams(MATCH_PARENT, 0, 1.0f));
} else {
contentPanel.setVisibility(View.GONE);
}
@@ -657,8 +657,8 @@ public class AlertController {
ViewGroup parent = (ViewGroup) mWindow.findViewById(R.id.parentPanel);
parent.removeView(buttonPanel);
AbsListView.LayoutParams params = new AbsListView.LayoutParams(
- AbsListView.LayoutParams.FILL_PARENT,
- AbsListView.LayoutParams.FILL_PARENT);
+ AbsListView.LayoutParams.MATCH_PARENT,
+ AbsListView.LayoutParams.MATCH_PARENT);
buttonPanel.setLayoutParams(params);
mListView.addFooterView(buttonPanel);
*/
diff --git a/core/java/com/android/internal/view/menu/IconMenuItemView.java b/core/java/com/android/internal/view/menu/IconMenuItemView.java
index 66e15c1..3c5b422 100644
--- a/core/java/com/android/internal/view/menu/IconMenuItemView.java
+++ b/core/java/com/android/internal/view/menu/IconMenuItemView.java
@@ -254,7 +254,7 @@ public final class IconMenuItemView extends TextView implements MenuView.ItemVie
if (lp == null) {
// Default layout parameters
lp = new IconMenuView.LayoutParams(
- IconMenuView.LayoutParams.FILL_PARENT, IconMenuView.LayoutParams.FILL_PARENT);
+ IconMenuView.LayoutParams.MATCH_PARENT, IconMenuView.LayoutParams.MATCH_PARENT);
}
// Set the desired width of item
diff --git a/core/java/com/android/internal/widget/SlidingTab.java b/core/java/com/android/internal/widget/SlidingTab.java
index f07b2f1..adafbb4 100644
--- a/core/java/com/android/internal/widget/SlidingTab.java
+++ b/core/java/com/android/internal/widget/SlidingTab.java
@@ -23,8 +23,6 @@ import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
-import android.os.Handler;
-import android.os.Message;
import android.os.Vibrator;
import android.util.AttributeSet;
import android.util.Log;
@@ -34,7 +32,6 @@ import android.view.View;
import android.view.ViewGroup;
import android.view.animation.AlphaAnimation;
import android.view.animation.Animation;
-import android.view.animation.AnimationSet;
import android.view.animation.LinearInterpolator;
import android.view.animation.TranslateAnimation;
import android.view.animation.Animation.AnimationListener;
@@ -214,7 +211,7 @@ public class SlidingTab extends ViewGroup {
// Create hint TextView
text = new TextView(parent.getContext());
text.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT,
- LayoutParams.FILL_PARENT));
+ LayoutParams.MATCH_PARENT));
text.setBackgroundResource(barId);
text.setTextAppearance(parent.getContext(), R.style.TextAppearance_SlidingTabNormal);
// hint.setSingleLine(); // Hmm.. this causes the text to disappear off-screen