diff options
author | Xavier Ducrohet <xav@google.com> | 2010-01-11 15:25:16 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-01-11 15:25:16 -0800 |
commit | dfe25b0e0c382d04a59bb03c7f5f8689ece5395e (patch) | |
tree | 23972c8e9c6eb845fee3ac6e5bdf4868d9acabf9 /tools | |
parent | ccaebfc9428aa7c167caf469f7393e1fb375307e (diff) | |
parent | 9ce3b775f55abd0ceb1d8e96968ce725f1f8bade (diff) | |
download | frameworks_base-dfe25b0e0c382d04a59bb03c7f5f8689ece5395e.zip frameworks_base-dfe25b0e0c382d04a59bb03c7f5f8689ece5395e.tar.gz frameworks_base-dfe25b0e0c382d04a59bb03c7f5f8689ece5395e.tar.bz2 |
Merge "LayoutLib: support for custom styles." into eclair
Diffstat (limited to 'tools')
-rw-r--r-- | tools/layoutlib/bridge/src/com/android/layoutlib/bridge/BridgeContext.java | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/BridgeContext.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/BridgeContext.java index 1e9f573..b670eee 100644 --- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/BridgeContext.java +++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/BridgeContext.java @@ -259,7 +259,18 @@ public final class BridgeContext extends Context { // resolve the defStyleAttr value into a IStyleResourceValue IStyleResourceValue defStyleValues = null; - if (defStyleAttr != 0) { + + // look for a custom style. + String customStyle = parser.getAttributeValue(null /* namespace*/, "style"); + if (customStyle != null) { + IResourceValue item = findResValue(customStyle); + + if (item instanceof IStyleResourceValue) { + defStyleValues = (IStyleResourceValue)item; + } + } + + if (defStyleValues == null && defStyleAttr != 0) { // get the name from the int. String defStyleName = searchAttr(defStyleAttr); @@ -1104,7 +1115,7 @@ public final class BridgeContext extends Context { Bundle initialExtras) { // TODO Auto-generated method stub } - + @Override public void setTheme(int arg0) { // TODO Auto-generated method stub @@ -1137,7 +1148,7 @@ public final class BridgeContext extends Context { throws IntentSender.SendIntentException { // TODO Auto-generated method stub } - + @Override public boolean startInstrumentation(ComponentName arg0, String arg1, Bundle arg2) { |