Android - Listview delete item and Refresh

后端 未结 9 1704
耶瑟儿~
耶瑟儿~ 2020-12-06 02:16

I am trying to implement ListView with Delete functionality to delete item from the listview. I am successful to delete but failed to refresh the listview after deletetion o

9条回答
  •  有刺的猬
    2020-12-06 02:51

    I'm guessing that using

    getActivity().recreate();
    

    instead of restarting the activity via a new Intent is better because using a new Intent will only stop the current activity and not destroy it.

    Anyway, it works.

提交回复
热议问题