aboutsummaryrefslogtreecommitdiffstats
path: root/layoutopt/libs
diff options
context:
space:
mode:
authorRomain Guy <romainguy@android.com>2010-01-08 15:07:24 -0800
committerRomain Guy <romainguy@android.com>2010-01-08 15:12:07 -0800
commit6ca40b28e8acc510deb806a216b9c3e9aa164e7e (patch)
tree544fd7d99b1a6659cc10b1fc3c791cddb8551089 /layoutopt/libs
parent62bb30a97d16d007a05b5db51a7b5213ef041f64 (diff)
downloadsdk-6ca40b28e8acc510deb806a216b9c3e9aa164e7e.zip
sdk-6ca40b28e8acc510deb806a216b9c3e9aa164e7e.tar.gz
sdk-6ca40b28e8acc510deb806a216b9c3e9aa164e7e.tar.bz2
Deprecate fill_parent and introduce match_parent.
Bug: #2361749.
Diffstat (limited to 'layoutopt/libs')
-rw-r--r--layoutopt/libs/uix/src/com/android/layoutopt/uix/groovy/LayoutAnalysisCategory.java6
-rw-r--r--layoutopt/libs/uix/src/resources/rules/IncorrectHeightInScrollView.rule2
-rw-r--r--layoutopt/libs/uix/src/resources/rules/IncorrectWidthInHorizontalScrollView.rule2
-rw-r--r--layoutopt/libs/uix/src/resources/rules/MergeRootFrameLayout.rule2
4 files changed, 6 insertions, 6 deletions
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