tags:

views:

29

answers:

2

hi all , i want to refresh my expandablelistview , but it seems there is no way to use notifyDataSetChanged()??

how can i refresh my expandablelistview?? thx

A: 

Why not notifyDataSetChanged()?

could you give me a sample code?
peterlawn
ArrayList data = new ArrayList(); MyAdapter adapter = new MyAdapter(this, data); ListView list = new ListView(this); list.setAdapter(adapter); ....../*notify if need*/ adapter.notifyDataSetChanget();
i tried , but there is no notifyDataSetChange() method for my adapter.... ?_?
peterlawn
i wrote this to get Adapter :mp3_listView.getAdapter() but only saw notify() and notifyAll()
peterlawn
try to do like this: MyAdapter adapter = new MyAdapter(...); mp3_listView.setAdapter(adapter);.........adapter.notifyDataSetChanget();
or ((MyAdapter)mp3_listView.getAdapter()).notifyDataSetChanged();
A: 

Have your adapter extend BaseExpandableListAdapter or one of its subclasses. This class has the notifyDataSetChanged method in it.

Daddyboy