且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

android:从数据库中删除后,列表视图中的数据刷新

更新时间:2023-02-04 10:02:29

您需要通过adapter.remove(adapter.getItem(position));从列表视图的适配器中删除数据,然后在适配器上调用notifyDataSetChanged().

You need to delete the data from the adapter of the listview via adapter.remove(adapter.getItem(position)); and then call notifyDataSetChanged() on adapter.