summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorXavier Ducrohet <xav@google.com>2014-05-29 05:27:32 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-05-29 05:27:32 +0000
commit7ee26070eaa4a8b1cde8e265c7136fba7e79a172 (patch)
tree8a6fe15067f4abba5a3f069907ed092edae52906 /tools
parent312da405eb82206cdd2581176252241f22d2ad44 (diff)
parentdc62340f18becf51f6f3c94d3994665bcd7dd537 (diff)
downloadframeworks_base-7ee26070eaa4a8b1cde8e265c7136fba7e79a172.zip
frameworks_base-7ee26070eaa4a8b1cde8e265c7136fba7e79a172.tar.gz
frameworks_base-7ee26070eaa4a8b1cde8e265c7136fba7e79a172.tar.bz2
Merge "Stopgap fix for layoutlib." into lmp-preview-dev
Diffstat (limited to 'tools')
-rw-r--r--tools/layoutlib/bridge/src/android/content/res/BridgeTypedArray.java12
-rw-r--r--tools/layoutlib/bridge/src/android/content/res/TypedArray_Delegate.java3
2 files changed, 12 insertions, 3 deletions
diff --git a/tools/layoutlib/bridge/src/android/content/res/BridgeTypedArray.java b/tools/layoutlib/bridge/src/android/content/res/BridgeTypedArray.java
index cc621c4..105803e 100644
--- a/tools/layoutlib/bridge/src/android/content/res/BridgeTypedArray.java
+++ b/tools/layoutlib/bridge/src/android/content/res/BridgeTypedArray.java
@@ -826,6 +826,11 @@ public final class BridgeTypedArray extends TypedArray {
return null;
}
+ @Override
+ public int[] extractThemeAttrs() {
+ return null;
+ }
+
/**
* Retrieve the raw TypedValue for the attribute at <var>index</var>.
*
@@ -912,4 +917,9 @@ public final class BridgeTypedArray extends TypedArray {
public String toString() {
return Arrays.toString(mResourceData);
}
- }
+
+ static TypedArray obtain(Resources res, int len) {
+ return res instanceof BridgeResources ?
+ new BridgeTypedArray(((BridgeResources) res), null, len, true) : null;
+ }
+}
diff --git a/tools/layoutlib/bridge/src/android/content/res/TypedArray_Delegate.java b/tools/layoutlib/bridge/src/android/content/res/TypedArray_Delegate.java
index 5d89f83..faa8852 100644
--- a/tools/layoutlib/bridge/src/android/content/res/TypedArray_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/content/res/TypedArray_Delegate.java
@@ -30,7 +30,6 @@ public class TypedArray_Delegate {
@LayoutlibDelegate
/*package*/ static TypedArray obtain(Resources res, int len) {
- // FIXME
- return null;
+ return BridgeTypedArray.obtain(res, len);
}
}