summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDeepanshu Gupta <deepanshu@google.com>2014-07-18 21:39:35 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-07-18 21:39:35 +0000
commitccf7b2aac600b6069f03f7f420872b64cc5e6726 (patch)
tree70ec691409dc692239c04ee0d64792c80aed2305
parent61fb5784322fce5198e74834c32c8d8c547a8adf (diff)
parent5af7324ace4f318d7395b680beabec7a0f0e39b3 (diff)
downloadframeworks_base-ccf7b2aac600b6069f03f7f420872b64cc5e6726.zip
frameworks_base-ccf7b2aac600b6069f03f7f420872b64cc5e6726.tar.gz
frameworks_base-ccf7b2aac600b6069f03f7f420872b64cc5e6726.tar.bz2
am 5af7324a: Fix style resolution for styles with \'.\' [DO NOT MERGE]
* commit '5af7324ace4f318d7395b680beabec7a0f0e39b3': Fix style resolution for styles with '.' [DO NOT MERGE]
-rw-r--r--tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java17
1 files changed, 7 insertions, 10 deletions
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
index b857883..a2fd593 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
@@ -607,19 +607,16 @@ public final class BridgeContext extends Context {
}
if (value != null) {
- if ((value.getFirst() == ResourceType.STYLE)
- || (value.getFirst() == ResourceType.ATTR)) {
- // look for the style in the current theme, and its parent:
- ResourceValue item = mRenderResources.findItemInTheme(value.getSecond(),
+ if (value.getFirst() == ResourceType.STYLE) {
+ // look for the style in all resources:
+ StyleResourceValue item = mRenderResources.getStyle(value.getSecond(),
isFrameworkRes);
if (item != null) {
- if (item instanceof StyleResourceValue) {
- if (defaultPropMap != null) {
- defaultPropMap.put("style", item.getName());
- }
-
- defStyleValues = (StyleResourceValue)item;
+ if (defaultPropMap != null) {
+ defaultPropMap.put("style", item.getName());
}
+
+ defStyleValues = item;
} else {
Bridge.getLog().error(null,
String.format(