diff options
author | Deepanshu Gupta <deepanshu@google.com> | 2014-07-18 21:42:10 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-07-18 21:42:10 +0000 |
commit | d8d3e87cf339deaf890e4b083d09b074065cd35f (patch) | |
tree | c432967584d08d3c09ec0427f572f92a38fb8672 /tools | |
parent | c425c438a38f9065c4fbae76602bce66563950c0 (diff) | |
parent | 4627c98da4ecb66e32a3273ea3713df528cda6b2 (diff) | |
download | frameworks_base-d8d3e87cf339deaf890e4b083d09b074065cd35f.zip frameworks_base-d8d3e87cf339deaf890e4b083d09b074065cd35f.tar.gz frameworks_base-d8d3e87cf339deaf890e4b083d09b074065cd35f.tar.bz2 |
am 4627c98d: Merge "Fix style resolution for styles with \'.\' [DO NOT MERGE]" into klp-dev
* commit '4627c98da4ecb66e32a3273ea3713df528cda6b2':
Fix style resolution for styles with '.' [DO NOT MERGE]
Diffstat (limited to 'tools')
-rw-r--r-- | tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java | 17 |
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 f674da0..625f108 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 @@ -613,19 +613,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( |