4949import android .content .res .BridgeTypedArray ;
5050import android .content .res .Configuration ;
5151import android .content .res .Resources ;
52- import android .content .res .TypedArray ;
5352import android .content .res .Resources .Theme ;
53+ import android .content .res .TypedArray ;
5454import android .database .DatabaseErrorHandler ;
5555import android .database .sqlite .SQLiteDatabase ;
5656import android .database .sqlite .SQLiteDatabase .CursorFactory ;
7878import java .util .HashMap ;
7979import java .util .IdentityHashMap ;
8080import java .util .Map ;
81- import java .util .TreeMap ;
8281import java .util .Map .Entry ;
82+ import java .util .TreeMap ;
8383import java .util .concurrent .atomic .AtomicBoolean ;
8484import java .util .concurrent .atomic .AtomicReference ;
8585
@@ -615,7 +615,8 @@ public TypedArray obtainStyledAttributes(AttributeSet set, int[] attrs,
615615 }
616616
617617 String namespace = BridgeConstants .NS_RESOURCES ;
618- if (frameworkAttributes .get () == false ) {
618+ boolean useFrameworkNS = frameworkAttributes .get ();
619+ if (useFrameworkNS == false ) {
619620 // need to use the application namespace
620621 namespace = mProjectCallback .getNamespace ();
621622 }
@@ -628,6 +629,12 @@ public TypedArray obtainStyledAttributes(AttributeSet set, int[] attrs,
628629 String value = null ;
629630 if (set != null ) {
630631 value = set .getAttributeValue (namespace , name );
632+
633+ // if this is an app attribute, and the first get fails, try with the
634+ // new res-auto namespace as well
635+ if (useFrameworkNS == false && value == null ) {
636+ value = set .getAttributeValue (BridgeConstants .NS_APP_RES_AUTO , name );
637+ }
631638 }
632639
633640 // if there's no direct value for this attribute in the XML, we look for default
0 commit comments