Updating ExpandableListView with notifyDataSetChanged()

前端 未结 3 2045
庸人自扰
庸人自扰 2020-12-20 14:49

First a short overview of my code, i hope its understandable:

  • I have a class called ToDoElement with a few variables.
  • I
3条回答
  •  被撕碎了的回忆
    2020-12-20 15:02

    You should call expListAdapter.notifyDataSetInvalidated()

    expListAdapter.notifyDataSetChanged() will just update your views for the new values for each items (no change in any of the elements)

    i.e it will again call your getChildView and getGroupView for each item.

提交回复
热议问题