Android - Listview delete item and Refresh

后端 未结 9 1863
耶瑟儿~
耶瑟儿~ 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 03:02

    I did something like this in my adapter:

    ((Activity)cxt).finish();
    Intent intent = new Intent(cxt, YourActivity.class);
    cxt.startActivity(intent);
    

    This ends the activity and then starts the same one again.

提交回复
热议问题