This is not a bug. You are giving the same id to all the children so when
the state is saved/restored, all your views will end up with the same data.
You either need to disable instance state save & restore or use unique ids.


On Thu, May 9, 2013 at 2:06 PM, Y2i <yur...@gmail.com> wrote:

> I ran into this issue earlier today:
> https://code.google.com/p/android/issues/detail?id=55106
>
> The problem is:
>
>    - LinearLayout has children
>    - every child is inflated from the same XML layout file
>    - a child has nested element with some ID.
>       - The ID is used to call findViewById(ID) to set some value
>    - Everything is displayed properly on startup, but after orientation
>    change every child of LinearLayout displays the value of the last data item
>    - As soon as ID is removed from the child XML layout file, everything
>    starts working properly
>
> The bug has the sample project attached that demonstrates the problem.
>
> Just wanted to ask if somebody has experienced the same issue and knows a
> workaround?
>
> Thank you,
> Yuri
>
>  --
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-developers+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



-- 
Romain Guy
Android framework engineer
romain...@android.com

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to