diff options
16 files changed, 75 insertions, 75 deletions
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/descriptors/DescriptorsUtils.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/descriptors/DescriptorsUtils.java index 246113c..92793b5 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/descriptors/DescriptorsUtils.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/descriptors/DescriptorsUtils.java @@ -711,7 +711,7 @@ public final class DescriptorsUtils { * This does not override attributes which are not empty. */ public static void setDefaultLayoutAttributes(UiElementNode ui_node, boolean updateLayout) { - // if this ui_node is a layout and we're adding it to a document, use fill_parent for + // if this ui_node is a layout and we're adding it to a document, use match_parent for // both W/H. Otherwise default to wrap_layout. boolean fill = ui_node.getDescriptor().hasChildren() && ui_node.getUiParent() instanceof UiDocumentNode; diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/LayoutConstants.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/LayoutConstants.java index b36c985..5c9f778 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/LayoutConstants.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/LayoutConstants.java @@ -56,7 +56,7 @@ public class LayoutConstants { public static final String ATTR_LAYOUT_X = "layout_x"; //$NON-NLS-1$ public static final String VALUE_WRAP_CONTENT = "wrap_content"; //$NON-NLS-1$ - public static final String VALUE_FILL_PARENT = "fill_parent"; //$NON-NLS-1$ + public static final String VALUE_FILL_PARENT = "match_parent"; //$NON-NLS-1$ public static final String VALUE_TRUE = "true"; //$NON-NLS-1$ public static final String VALUE_N_DIP = "%ddip"; //$NON-NLS-1$ diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/mock_attrs.xml b/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/mock_attrs.xml index aa9a1f7..db77e17 100644 --- a/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/mock_attrs.xml +++ b/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/mock_attrs.xml @@ -228,7 +228,7 @@ the special constants. --> <attr name="layout_width" format="dimension"> <!-- The view should be as big as its parent (minus padding). --> - <enum name="fill_parent" value="-1" /> + <enum name="match_parent" value="-1" /> <!-- The view should be only big enough to enclose its content (plus padding). --> <enum name="wrap_content" value="-2" /> </attr> @@ -239,7 +239,7 @@ the special constants. --> <attr name="layout_height" format="dimension"> <!-- The view should be as big as its parent (minus padding). --> - <enum name="fill_parent" value="-1" /> + <enum name="match_parent" value="-1" /> <!-- The view should be only big enough to enclose its content (plus padding). --> <enum name="wrap_content" value="-2" /> </attr> diff --git a/layoutopt/libs/uix/src/com/android/layoutopt/uix/groovy/LayoutAnalysisCategory.java b/layoutopt/libs/uix/src/com/android/layoutopt/uix/groovy/LayoutAnalysisCategory.java index a70086d..508a277 100644 --- a/layoutopt/libs/uix/src/com/android/layoutopt/uix/groovy/LayoutAnalysisCategory.java +++ b/layoutopt/libs/uix/src/com/android/layoutopt/uix/groovy/LayoutAnalysisCategory.java @@ -42,7 +42,7 @@ public class LayoutAnalysisCategory { private static final String ANDROID_PADDING_BOTTOM = "android:paddingBottom"; private static final String ANDROID_LAYOUT_WIDTH = "android:layout_width"; private static final String ANDROID_LAYOUT_HEIGHT = "android:layout_height"; - private static final String VALUE_FILL_PARENT = "fill_parent"; + private static final String VALUE_FILL_PARENT = "match_parent"; private static final String VALUE_WRAP_CONTENT = "wrap_content"; private static final String[] sContainers = new String[] { @@ -118,7 +118,7 @@ public class LayoutAnalysisCategory { } /** - * Returns whether this node's width is fill_parent. + * Returns whether this node's width is match_parent. */ public static boolean isWidthFillParent(Element element) { return element.getAttribute(ANDROID_LAYOUT_WIDTH).equals(VALUE_FILL_PARENT); @@ -132,7 +132,7 @@ public class LayoutAnalysisCategory { } /** - * Returns whether this node's height is fill_parent. + * Returns whether this node's height is match_parent. */ public static boolean isHeightFillParent(Element element) { return element.getAttribute(ANDROID_LAYOUT_HEIGHT).equals(VALUE_FILL_PARENT); diff --git a/layoutopt/libs/uix/src/resources/rules/IncorrectHeightInScrollView.rule b/layoutopt/libs/uix/src/resources/rules/IncorrectHeightInScrollView.rule index d29ebd5..36d3c2e 100644 --- a/layoutopt/libs/uix/src/resources/rules/IncorrectHeightInScrollView.rule +++ b/layoutopt/libs/uix/src/resources/rules/IncorrectHeightInScrollView.rule @@ -4,7 +4,7 @@ // // Conditions: // - The node has a ScrollView parent -// - The node has a height set to fill_parent +// - The node has a height set to match_parent if (node.'..'.is("ScrollView") && node.isHeightFillParent()) { analysis << "This ${node.name()} tag should use android:layout_height=\"wrap_content\"" diff --git a/layoutopt/libs/uix/src/resources/rules/IncorrectWidthInHorizontalScrollView.rule b/layoutopt/libs/uix/src/resources/rules/IncorrectWidthInHorizontalScrollView.rule index 17da843..b96e034 100644 --- a/layoutopt/libs/uix/src/resources/rules/IncorrectWidthInHorizontalScrollView.rule +++ b/layoutopt/libs/uix/src/resources/rules/IncorrectWidthInHorizontalScrollView.rule @@ -4,7 +4,7 @@ // // Conditions: // - The node has a HorizontalScrollView parent -// - The node has a width set to fill_parent +// - The node has a width set to match_parent if (node.'..'.is("HorizontalScrollView") && node.isWidthFillParent()) { analysis << "This ${node.name()} tag should use android:layout_width=\"wrap_content\"" diff --git a/layoutopt/libs/uix/src/resources/rules/MergeRootFrameLayout.rule b/layoutopt/libs/uix/src/resources/rules/MergeRootFrameLayout.rule index d3fc3d9..c477155 100644 --- a/layoutopt/libs/uix/src/resources/rules/MergeRootFrameLayout.rule +++ b/layoutopt/libs/uix/src/resources/rules/MergeRootFrameLayout.rule @@ -6,7 +6,7 @@ // Conditions: // - The node is the root of the document // - The node is a FrameLayout -// - The node is fill_parent in both orientation *or* it has no layout_gravity +// - The node is match_parent in both orientation *or* it has no layout_gravity // - The node does not have a background nor a foreground // - The node does not have padding diff --git a/layoutopt/samples/compound.xml b/layoutopt/samples/compound.xml index 176089b..f7b28ef 100644 --- a/layoutopt/samples/compound.xml +++ b/layoutopt/samples/compound.xml @@ -3,8 +3,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"> <ImageView android:layout_width="wrap_content" diff --git a/layoutopt/samples/has_children.xml b/layoutopt/samples/has_children.xml index f216db5..3e663b2 100644 --- a/layoutopt/samples/has_children.xml +++ b/layoutopt/samples/has_children.xml @@ -3,11 +3,11 @@ <ListView 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"> <ListView - android:layout_width="fill_parent" - android:layout_height="fill_parent" /> + android:layout_width="match_parent" + android:layout_height="match_parent" /> </ListView>
\ No newline at end of file diff --git a/layoutopt/samples/inefficient_weight.xml b/layoutopt/samples/inefficient_weight.xml index 785350a..81c8b71 100644 --- a/layoutopt/samples/inefficient_weight.xml +++ b/layoutopt/samples/inefficient_weight.xml @@ -3,24 +3,24 @@ <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"> <Button - android:layout_width="fill_parent" + android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_weight="1.0" /> <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"> <Button - android:layout_width="fill_parent" + android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_weight="1.0" /> @@ -29,13 +29,13 @@ <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"> <Button - android:layout_width="fill_parent" + android:layout_width="match_parent" android:layout_height="0dip" android:layout_weight="1.0" /> diff --git a/layoutopt/samples/scrolling.xml b/layoutopt/samples/scrolling.xml index 534289c..9eb862f 100644 --- a/layoutopt/samples/scrolling.xml +++ b/layoutopt/samples/scrolling.xml @@ -3,16 +3,16 @@ <ScrollView 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"> <LinearLayout - android:layout_width="fill_parent" - android:layout_height="fill_parent"> + android:layout_width="match_parent" + android:layout_height="match_parent"> <ListView - android:layout_width="fill_parent" - android:layout_height="fill_parent" /> + android:layout_width="match_parent" + android:layout_height="match_parent" /> </LinearLayout> diff --git a/layoutopt/samples/simple.xml b/layoutopt/samples/simple.xml index 1fd36e2..d462c69 100644 --- a/layoutopt/samples/simple.xml +++ b/layoutopt/samples/simple.xml @@ -3,5 +3,5 @@ <FrameLayout 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" /> diff --git a/layoutopt/samples/too_deep.xml b/layoutopt/samples/too_deep.xml index 7317362..0c617b8 100644 --- a/layoutopt/samples/too_deep.xml +++ b/layoutopt/samples/too_deep.xml @@ -3,8 +3,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"> <Button android:layout_width="wrap_content" @@ -12,48 +12,48 @@ android:text="Ok" /> <LinearLayout - android:layout_width="fill_parent" - android:layout_height="fill_parent"> + android:layout_width="match_parent" + android:layout_height="match_parent"> <LinearLayout - android:layout_width="fill_parent" - android:layout_height="fill_parent"> + android:layout_width="match_parent" + android:layout_height="match_parent"> <LinearLayout - android:layout_width="fill_parent" - android:layout_height="fill_parent"> + android:layout_width="match_parent" + android:layout_height="match_parent"> <LinearLayout - android:layout_width="fill_parent" - android:layout_height="fill_parent"> + android:layout_width="match_parent" + android:layout_height="match_parent"> <LinearLayout - android:layout_width="fill_parent" - android:layout_height="fill_parent"> + android:layout_width="match_parent" + android:layout_height="match_parent"> <LinearLayout - android:layout_width="fill_parent" - android:layout_height="fill_parent"> + android:layout_width="match_parent" + android:layout_height="match_parent"> <LinearLayout - android:layout_width="fill_parent" - android:layout_height="fill_parent"> + android:layout_width="match_parent" + android:layout_height="match_parent"> <LinearLayout - android:layout_width="fill_parent" - android:layout_height="fill_parent"> + android:layout_width="match_parent" + android:layout_height="match_parent"> <LinearLayout - android:layout_width="fill_parent" - android:layout_height="fill_parent"> + android:layout_width="match_parent" + android:layout_height="match_parent"> <LinearLayout - android:layout_width="fill_parent" - android:layout_height="fill_parent"> + android:layout_width="match_parent" + android:layout_height="match_parent"> <LinearLayout - android:layout_width="fill_parent" - android:layout_height="fill_parent"> + android:layout_width="match_parent" + android:layout_height="match_parent"> <Button android:layout_width="wrap_content" diff --git a/layoutopt/samples/too_many.xml b/layoutopt/samples/too_many.xml index 41c18ff..2ea266d 100644 --- a/layoutopt/samples/too_many.xml +++ b/layoutopt/samples/too_many.xml @@ -3,8 +3,8 @@ <FrameLayout 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"> <Button android:layout_width="wrap_content" @@ -67,8 +67,8 @@ android:text="Ok" /> <LinearLayout - android:layout_width="fill_parent" - android:layout_height="fill_parent"> + android:layout_width="match_parent" + android:layout_height="match_parent"> <Button android:layout_width="wrap_content" @@ -151,8 +151,8 @@ android:text="Ok" /> <LinearLayout - android:layout_width="fill_parent" - android:layout_height="fill_parent"> + android:layout_width="match_parent" + android:layout_height="match_parent"> <Button android:layout_width="wrap_content" @@ -239,8 +239,8 @@ </LinearLayout> <LinearLayout - android:layout_width="fill_parent" - android:layout_height="fill_parent"> + android:layout_width="match_parent" + android:layout_height="match_parent"> <Button android:layout_width="wrap_content" @@ -323,8 +323,8 @@ android:text="Ok" /> <LinearLayout - android:layout_width="fill_parent" - android:layout_height="fill_parent"> + android:layout_width="match_parent" + android:layout_height="match_parent"> <Button android:layout_width="wrap_content" diff --git a/layoutopt/samples/useless.xml b/layoutopt/samples/useless.xml index 1c2d5d8..61b70af 100644 --- a/layoutopt/samples/useless.xml +++ b/layoutopt/samples/useless.xml @@ -3,12 +3,12 @@ <FrameLayout 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"> <LinearLayout - android:layout_width="fill_parent" - android:layout_height="fill_parent"> + android:layout_width="match_parent" + android:layout_height="match_parent"> <TextView android:layout_width="wrap_content" diff --git a/layoutopt/samples/wrong_dimension.xml b/layoutopt/samples/wrong_dimension.xml index c0b292b..79b922b 100644 --- a/layoutopt/samples/wrong_dimension.xml +++ b/layoutopt/samples/wrong_dimension.xml @@ -3,11 +3,11 @@ <HorizontalScrollView 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"> <LinearLayout - android:layout_width="fill_parent" - android:layout_height="fill_parent" /> + android:layout_width="match_parent" + android:layout_height="match_parent" /> </HorizontalScrollView> |