diff options
| author | Deepanshu Gupta <deepanshu@google.com> | 2014-09-04 01:53:16 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-09-04 01:53:17 +0000 |
| commit | 509e5db14908f85c1ad4b93e8bbed5afd4c2c8fe (patch) | |
| tree | 8233b79ef0a18576041801bc14dd8d4bcd4e5dc2 /tools/layoutlib/bridge/src/android/util/BridgeXmlPullAttributes.java | |
| parent | 47a400131f026fd4afdf09e77fe82e79201c1458 (diff) | |
| parent | cb6dfc2869020f73d95e9951387bc310085bee8d (diff) | |
| download | frameworks_base-509e5db14908f85c1ad4b93e8bbed5afd4c2c8fe.zip frameworks_base-509e5db14908f85c1ad4b93e8bbed5afd4c2c8fe.tar.gz frameworks_base-509e5db14908f85c1ad4b93e8bbed5afd4c2c8fe.tar.bz2 | |
Merge "Resolve color xml attributes properly. [DO NOT MERGE]" into klp-dev
Diffstat (limited to 'tools/layoutlib/bridge/src/android/util/BridgeXmlPullAttributes.java')
| -rw-r--r-- | tools/layoutlib/bridge/src/android/util/BridgeXmlPullAttributes.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/layoutlib/bridge/src/android/util/BridgeXmlPullAttributes.java b/tools/layoutlib/bridge/src/android/util/BridgeXmlPullAttributes.java index 6ac5b02..691339e 100644 --- a/tools/layoutlib/bridge/src/android/util/BridgeXmlPullAttributes.java +++ b/tools/layoutlib/bridge/src/android/util/BridgeXmlPullAttributes.java @@ -22,6 +22,7 @@ import com.android.internal.util.XmlUtils; import com.android.layoutlib.bridge.Bridge; import com.android.layoutlib.bridge.BridgeConstants; import com.android.layoutlib.bridge.android.BridgeContext; +import com.android.layoutlib.bridge.impl.ResourceHelper; import com.android.resources.ResourceType; import org.xmlpull.v1.XmlPullParser; @@ -210,6 +211,9 @@ public class BridgeXmlPullAttributes extends XmlPullAttributes { value = r.getValue(); } + if (value.charAt(0) == '#') { + return ResourceHelper.getColor(value); + } return XmlUtils.convertValueToInt(value, defaultValue); } |
