diff options
author | Deepanshu Gupta <deepanshu@google.com> | 2014-08-12 17:12:53 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-08-11 18:14:57 +0000 |
commit | b205fa602f50822f2b404ad7cb7b911f8779f70a (patch) | |
tree | fe3f583d26aacd0a76665a118d144d1282cae83d /tools | |
parent | dc77ea411a852d8c0086f5ea7663d2697cf81e7f (diff) | |
parent | 99d90a621084ec0f799dc7840cc05565a0589031 (diff) | |
download | frameworks_base-b205fa602f50822f2b404ad7cb7b911f8779f70a.zip frameworks_base-b205fa602f50822f2b404ad7cb7b911f8779f70a.tar.gz frameworks_base-b205fa602f50822f2b404ad7cb7b911f8779f70a.tar.bz2 |
Merge "Resolve color xml attributes properly." into lmp-dev
Diffstat (limited to 'tools')
-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); } |