Sorry for asking it here, but i have the same problem and some points were 
not clear for me. 

What do you mean by views that don't need to save their state? In my case, 
the problem is with custom views that don't have the same ids, but its 
children do, because it is created from a xml file. I thought of many 
workarounds, like using android:configChanges attribute in the manifest or 
commenting the line that calls the super.onRestoreInstanceState(), but I 
really wanna know if there is a solution for this that is not considered a 
workaround.

Thanks in advance, 

Em sábado, 25 de abril de 2009 21h25min04s UTC-3, Toph escreveu:
>
> Hi, 
>
> I have TabActivity that uses 2 other ListActivities for the tabs. 
> Both underlying ListViews are set to CHOICE_MODE_MULTIPLE. 
> When I run the following sequence of events, I get a strange result: 
> 1) Setup one activity (tab) and its ListView using a CursorAdapter, 
> including checking some items on the list 
> 2) Reorient the screen (open the keyboard) 
> 3) Setup the second activity (tab) and its ListView using a 
> CursorAdapter, including checking some items on the list 
> 4) Switch back to the first tab 
>
> At this point, I can see in Eclipse that although (of course) each 
> ListView is a distinct object, the internal variable used to store the 
> checked state of items, called mCheckStates, is the SAME OBJECT 
> REFERENCE in each of the ListViews. 
>
> Clearly this is an issue, since the two views should not share the 
> checked state of items between them. 
>
> If I skip step #2, this does not occur 
>
> Here is a bit more detail: 
> After Step 1: ListView1 is object reference @1, ListView1.mCheckStates 
> is object reference @2 
> After Step 2: ListView1 is object reference @3, ListView1.mCheckStates 
> is object reference @4 (the reorientation recreates the views) 
> After Step 3: ListView2 is object reference @5, ListView1.mCheckStates 
> is object reference @2 <-- note the reuse of this reference from step 
> #1, not sure how/why 
> After Step 4: ListView1 is object reference @3 (unchanged), 
> ListView1.mCheckStates is object reference @2 (changed) <-- same as 
> ListView2.mCheckStates 
>
> Please help 
>
> Thanks 
>

-- 
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