diff options
| author | 2014-07-18 21:45:28 +0000 | |
|---|---|---|
| committer | 2014-07-18 21:45:28 +0000 | |
| commit | 9c48ab82084828087c47086f2379b4927ec057e2 (patch) | |
| tree | 9602c27df473b3f10c36ca76ad461916bb6ed58b | |
| parent | 8782a12005e90bbd49be579fb8ede3a42a007380 (diff) | |
| parent | ccf7b2aac600b6069f03f7f420872b64cc5e6726 (diff) | |
am ccf7b2aa: am 5af7324a: Fix style resolution for styles with \'.\' [DO NOT MERGE]
* commit 'ccf7b2aac600b6069f03f7f420872b64cc5e6726':
Fix style resolution for styles with '.' [DO NOT MERGE]
| -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 31ad6a0a8902..c36afa7614d4 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 @@ -609,19 +609,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( |