I have an application with an activity group, and it uses the local
activity manager class to start a subactivity and insert that
subactivity's view.  I do not have any custom onSaveInstanceState
logic written anywhere in my app.  I have a nested layout of relative
layout -> textview within that subactivity's view, and the text view's
id is "recent_apps_label".  I get this exception every time I rotate
the device to/from portrait/landscape orientation on froyo ONLY, never
saw this on eclair.

Please help - I have NO idea as to how the parcelable object getting
sent to onRestoreInstanceState would be for a list view.  I even
changed the id to something even more unique and it didn't fix the
problem.  I have a different layout file for the containing layout in
layout-land-mdpi, layout-port-mdpi, and layout-port-hdpi FYI.

Here is the exception:

E/AndroidRuntime( 1106): java.lang.IllegalArgumentException: Wrong
state class, expecting View State but received class
android.widget.AbsListView$SavedState instead. This usually happens
when two views of different type have the same id in the same
hierarchy. This view's id is id/recent_apps_label. Make sure other
views do not use the same id.
E/AndroidRuntime( 1106):        at
android.view.View.onRestoreInstanceState(View.java:6162)
E/AndroidRuntime( 1106):        at
android.widget.TextView.onRestoreInstanceState(TextView.java:2422)
E/AndroidRuntime( 1106):        at
android.view.View.dispatchRestoreInstanceState(View.java:6138)
E/AndroidRuntime( 1106):        at
android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:
1209)
E/AndroidRuntime( 1106):        at
android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:
1209)
E/AndroidRuntime( 1106):        at
android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:
1209)
E/AndroidRuntime( 1106):        at
android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:
1209)
E/AndroidRuntime( 1106):        at
android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:
1209)
E/AndroidRuntime( 1106):        at
android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:
1209)
E/AndroidRuntime( 1106):        at
android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:
1209)
E/AndroidRuntime( 1106):        at
android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:
1209)
E/AndroidRuntime( 1106):        at
android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:
1209)
E/AndroidRuntime( 1106):        at
android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:
1209)
E/AndroidRuntime( 1106):        at
android.view.View.restoreHierarchyState(View.java:6117)
E/AndroidRuntime( 1106):        at
com.android.internal.policy.impl.PhoneWindow.restoreHierarchyState(PhoneWindow.java:
1530)
E/AndroidRuntime( 1106):        at
android.app.Activity.onRestoreInstanceState(Activity.java:843)

-- 
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]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to