Kostadin
Kostadin

Reputation: 2549

Reload ExpandableListView items after adapter modified

I have to delete child item in my expandablelistview. My attempt was: 1. Data from adapter is removed successfully. 2. Tried to rebuild listview with 'm_list.invalidateViews()' Result is: exceptuion: index out of range.

Looking at debuger - value of childPosition is bigger than count of adapter data.Strange. Usualy getChildView is called for each item in adapter. So why getChildView is called with childPosition bigger than data size?

Upvotes: 0

Views: 3492

Answers (1)

jeet
jeet

Reputation: 29199

change the dataset from which you are loading list, and call adapter.notifyDataSetChanged();

Upvotes: 2

Related Questions