summaryrefslogtreecommitdiffstats
path: root/tools/layoutlib
diff options
context:
space:
mode:
authorDeepanshu Gupta <deepanshu@google.com>2014-07-09 17:27:07 -0700
committerDeepanshu Gupta <deepanshu@google.com>2014-07-10 00:30:03 +0000
commit5af7324ace4f318d7395b680beabec7a0f0e39b3 (patch)
tree375b6da42e1f55034e0376cecec666bc45cde396 /tools/layoutlib
parent3ff08eb6bf68868d4f4e872fbbf1ecaf521934a9 (diff)
downloadframeworks_base-5af7324ace4f318d7395b680beabec7a0f0e39b3.zip
frameworks_base-5af7324ace4f318d7395b680beabec7a0f0e39b3.tar.gz
frameworks_base-5af7324ace4f318d7395b680beabec7a0f0e39b3.tar.bz2
Fix style resolution for styles with '.' [DO NOT MERGE]
Bug: b.android.com/72698 Change-Id: I96fb549cf5787d9e8cde2245524a8173471a60ca (cherry picked from commit f2fa79e9b56b71f8aa30e6675255df69f88a173d)
Diffstat (limited to 'tools/layoutlib')
-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(