OSDN Git Service

LayoutLib: Correctly resolve ?attr/foo [DO NOT MERGE]
authorDeepanshu Gupta <deepanshu@google.com>
Fri, 16 May 2014 00:37:34 +0000 (17:37 -0700)
committerDeepanshu Gupta <deepanshu@google.com>
Fri, 30 May 2014 18:59:59 +0000 (11:59 -0700)
?attr/foo in platform files wasn't resolved properly. The IDE checked
the app namespace for the attribute even though it is being referenced
from a platform file.

Change-Id: I7db6dfef5b540d99804c298120578da9d060b886
(cherry picked from commit e21c7ec8a02922a6bec19436897f9ee02be3d6c2)

tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java

index 6595ce1..f674da0 100644 (file)
@@ -560,7 +560,7 @@ public final class BridgeContext extends Context {
         StyleResourceValue customStyleValues = null;
         if (customStyle != null) {
             ResourceValue item = mRenderResources.findResValue(customStyle,
-                    false /*forceFrameworkOnly*/);
+                    isPlatformFile /*forceFrameworkOnly*/);
 
             // resolve it in case it links to something else
             item = mRenderResources.resolveResValue(item);