1

Im using ExpandableListView and I want to delete a group once a button has been pressed in child Now, i removed the Groug+children from the HashMap and the list but it do not refreshed on listAdapter.notifyDataSetChanged() call.

once im leaving the Activity and get back the item is removed but I really need it to be removed on click... please help me Thanks michal

  • http://stackoverflow.com/questions/2250770/how-to-refresh-android-listview This post shows 2 methods: invalidate the listview or run `notifyDataSetChanged()` on the UI thread. My best guess is to try those – kutschenator Oct 05 '15 at 20:17
  • I added: listAdapter.setData(w.getWord(),x); runOnUiThread( new Runnable() { public void run() { //reload content listAdapter.notifyDataSetChanged(); expListView.invalidateViews(); expListView.refreshDrawableState(); } }); where setData: remove(key); _listDataHeader.get(location); notifyDataSetChanged(); – Michal Grossberg Oct 06 '15 at 07:47
  • still not being refreshed – Michal Grossberg Oct 06 '15 at 07:47
  • ok I removed the item form the wrong list :-/ its ok now :) – Michal Grossberg Oct 06 '15 at 08:41
  • dude what I did to handle this problem, after deleting the group, I call the Expendable list view and I put a new adapter with a new request, it works fine – NizarETH May 16 '17 at 16:05

0 Answers0