summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDeepanshu Gupta <deepanshu@google.com>2014-08-12 17:12:53 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-08-11 18:14:57 +0000
commitb205fa602f50822f2b404ad7cb7b911f8779f70a (patch)
treefe3f583d26aacd0a76665a118d144d1282cae83d /tools
parentdc77ea411a852d8c0086f5ea7663d2697cf81e7f (diff)
parent99d90a621084ec0f799dc7840cc05565a0589031 (diff)
downloadframeworks_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.java4
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);
}