diff options
author | Romain Guy <romainguy@android.com> | 2010-03-16 13:44:30 -0700 |
---|---|---|
committer | Romain Guy <romainguy@android.com> | 2010-03-16 13:44:30 -0700 |
commit | ad24b8b22527a67a1eb0b64517101335dc5529fd (patch) | |
tree | d781680b9e290a7fe32e1e472df2cd85448749c3 /layoutopt | |
parent | 6845b5679bbd6480eac600d56458517bcbbad609 (diff) | |
download | sdk-ad24b8b22527a67a1eb0b64517101335dc5529fd.zip sdk-ad24b8b22527a67a1eb0b64517101335dc5529fd.tar.gz sdk-ad24b8b22527a67a1eb0b64517101335dc5529fd.tar.bz2 |
Fix HierarchyViewer's loupe mode. It was displaying black with 2.0+ devices.
Change-Id: I645520ec8063efd522a5fecf3b0e204e8b94056e
Diffstat (limited to 'layoutopt')
-rw-r--r-- | layoutopt/libs/uix/src/com/android/layoutopt/uix/groovy/LayoutAnalysisCategory.java | 9 |
1 files changed, 6 insertions, 3 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 508a277..898df52 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,8 @@ 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 = "match_parent"; + private static final String VALUE_FILL_PARENT = "fill_parent"; + private static final String VALUE_MATCH_PARENT = "match_parent"; private static final String VALUE_WRAP_CONTENT = "wrap_content"; private static final String[] sContainers = new String[] { @@ -121,7 +122,8 @@ public class LayoutAnalysisCategory { * 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); + final String attribute = element.getAttribute(ANDROID_LAYOUT_WIDTH); + return attribute.equals(VALUE_FILL_PARENT) || attribute.equals(VALUE_MATCH_PARENT); } /** @@ -135,7 +137,8 @@ public class LayoutAnalysisCategory { * 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); + final String attribute = element.getAttribute(ANDROID_LAYOUT_HEIGHT); + return attribute.equals(VALUE_FILL_PARENT) || attribute.equals(VALUE_MATCH_PARENT); } /** |