Hi,

1 - You are most likely seeing issues caused by the list view "recycling"
item views. An ExpandableListView is a subclass of ListView, and item view
recycling is common to both of them.

Look it up, there are plenty of tutorials. The main thing is to always set
your child view's state completely in getChildView, even if convertView !=
null.

2 - You could set a tag in the checkbox or the root of your child item
layout, and use it to refer back to the data item (a database row or an
in-memory object). Look up View.setTag.

-- Kostya

2011/6/7 juliagrig <[email protected]>

> Hi All,
> I am working in an expandable list view by an simple expandable list
> adapter.  Also, I have fixed a database, where I store my data.I
> managed to display the data in expandable list view. Each child has a
> textview and a checkbox. Here is what I'm trying to achieve:
>
> 1) the checkboxes change states each time i expand an another group.
> How could I fixed this?for example, when I changed the state to
> checked for one child , I want to save state for this child .
> I tried the onSaveInstance () method, but does nothing.
>  2) how could I handle the checkbox for one child each time? How
> could  I separare the checkbox of a child? I have to use the
> database ? th IDs of children? I can't think about it.
>
> Thanks for your help.
>
> --
> 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

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