How to clear ListView on Fragment when back button pressed?

前端 未结 4 1895
隐瞒了意图╮
隐瞒了意图╮ 2021-01-21 12:53

All data from that ListView is provided by a CursorAdapter. Whenever I pressed back button and return to activity, then c

4条回答
  •  一生所求
    2021-01-21 13:09

    Make public a method in fragment which will clear your list and call that method from its parent activity's On onBackPressed using fragment's instance.

提交回复
热议问题