tags:

views:

149

answers:

1

Hi,

I'm using "ExpandableListView" in my application to display some options that . I need a way to build automatically the information to show when a group is expanded as the information might be different each time the group is expanded.

A: 

My guess, your items should be different ( different objects and use different layout ) so once you expand a group, the getView in your adapter will display layout needed. If you expect that data in your items themselves changes and you need to update that - you need to notify your adapter ( notifyDataSetChanged ).

If you need something specific on group expended - there are callbacks in the adapter - http://developer.android.com/reference/android/widget/ExpandableListAdapter.html onGroupExpanded(int groupPosition)

Alex Volovoy
I use the same layout for a simple listView , it's indeed the data that's expected to change and many times at the moment of expantion is not even available and needs to be computed .
rantravee
then AFTER you done computing, just notify the adapter that your data changed
Alex Volovoy