summaryrefslogtreecommitdiffstats
path: root/tools/layoutlib
diff options
context:
space:
mode:
authorXavier Ducrohet <xav@google.com>2010-01-11 15:30:29 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2010-01-11 15:30:29 -0800
commit6d40ee33f534aa31c5d9c4dbc6049275e3b754c2 (patch)
tree6a0027e59aef0eca8a8510ca6487ec941951599e /tools/layoutlib
parent6ee699102fda033c5b8cbb844c446bf3ecf44dbf (diff)
parentf5a84f8a7f91422f698ffbea3fabf77f2f7f77c8 (diff)
downloadframeworks_base-6d40ee33f534aa31c5d9c4dbc6049275e3b754c2.zip
frameworks_base-6d40ee33f534aa31c5d9c4dbc6049275e3b754c2.tar.gz
frameworks_base-6d40ee33f534aa31c5d9c4dbc6049275e3b754c2.tar.bz2
am f5a84f8a: am dfe25b0e: Merge "LayoutLib: support for custom styles." into eclair
Merge commit 'f5a84f8a7f91422f698ffbea3fabf77f2f7f77c8' * commit 'f5a84f8a7f91422f698ffbea3fabf77f2f7f77c8': LayoutLib: support for custom styles.
Diffstat (limited to 'tools/layoutlib')
-rw-r--r--tools/layoutlib/bridge/src/com/android/layoutlib/bridge/BridgeContext.java17
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) {