更新时间:2023-02-02 23:33:24
您可能得到它解决,但为了以防万一别人有同样的问题,这是我的解决方法:
You probably got it solved but just in case anyone else has the same Problem, here is my Solution:
ArrayAdapter<String> myAdapter = (ArrayAdapter<String>)getListView().getAdapter();
myAdapter.remove(myAdapter.getItem(info.position));
myAdapter.notifyDataSetChanged();
但问题是,你没有你的列表中选择适配器。
The Problem was that you did not have the Adapter of your List.