Ungh. This is probably a bug in the framework and, if so, won't be
fixed for 1.0. Sorry.
Generally I would suggest avoiding activity groups running activities
in other .apks. That's really not something we're prepared to support
in 1.0.
On Aug 20, 12:26 pm, Cheryl Sedota <[EMAIL PROTECTED]> wrote:
> I have an activity group in ApplicationA that started an Activity2 in
> ApplicationB, and everything worked perfectly in the m5 SDK. In the
> beta SDK, I get errors when the activity group in ApplicationA starts
> Activity2 and Activity2's view is being initialized - specifically
> when a TextView is being created.
>
> The problem seems to be that ApplicationA defines a color constant
> "white" in its colors.xml, and ApplicationB also defines a color
> "white" in its colors.xml, and Android is mixing the two application's
> contexts up - it's essentially sending ApplicationA's resource
> identifier for the color "white" along to a view being initialized in
> ApplicationB. Here is the exception we see:
>
> ERROR/AndroidRuntime(696): Caused by: android.content.res.Resources
> $NotFoundException: Resource is not a ColorStateList (color or path):
> TypedValue{t=0x1/d=0x7f040002 a=1 r=0x7f040002}
> ERROR/AndroidRuntime(696): at
> android.content.res.Resources.loadColorStateList(Resources.java:1506)
> 08-20 17:00:39.608: ERROR/AndroidRuntime(696): at
> android.content.res.TypedArray.getColorStateList(TypedArray.java:261)
> ERROR/AndroidRuntime(696): at
> android.widget.TextView.<init>(TextView.java:511)
> ERROR/AndroidRuntime(696): at
> android.widget.TextView.<init>(TextView.java:215)
> ERROR/AndroidRuntime(696): at
> android.widget.TextView.<init>(TextView.java:210)
> ERROR/AndroidRuntime(696): at
> com.frogdesign.common.ui.MyView.init(MyView.java:73)
>
> In ApplicationA's R.java file I see:
>
> public static final class color {
> public static final int black=0x7f040004;
> public static final int faded_white=0x7f040001;
> public static final int hyperlink_gray=0x7f040005;
> public static final int text_bottom_gray=0x7f040003;
> public static final int transparent=0x7f040000;
> public static final int white=0x7f040002;
> }
>
> In ApplicationB's R.java file I see:
>
> public static final class color {
> public static final int black=0x7f050003;
> public static final int button_price=0x7f050009;
> public static final int dark_blue=0x7f05000a;
> public static final int faded_white=0x7f050001;
> public static final int hyperlink_gray=0x7f050004;
> public static final int light_gray=0x7f05000b;
> public static final int song_artist=0x7f050008;
> public static final int song_title=0x7f050007;
> public static final int text_black=0x7f050006;
> public static final int text_bottom_gray=0x7f050005;
> public static final int transparent=0x7f050000;
> public static final int white=0x7f050002;
> }
>
> Is this a bug? I feel that it is, because ApplicationB's view should
> operate completely independently of ApplicationA, even if an
> ActivityGroup in ApplicationA is starting an activity in
> ApplicationB. I can think of several hacks to get around it but they
> are not reliable - this is a critical problem that is impacting our
> application from functioning properly on the beta SDK, we appreciate
> any info you can give as soon as you can.
>
> Thanks,
> Cheryl
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---