对ListView某一项进行操作

来源:互联网 发布:跨境电商进出口数据 编辑:程序博客网 时间:2024/06/04 18:06

删除ListView某一项:

listView.remove(position);//删除position的一项

listItemAdapter.notifyDataSetChanged();//更新ListView

更新ListView某一项

listView.remove(position);//删除位于position的项
listView.add(position, map);//在position位置用新的map填充数据
listItemAdapter.notifyDataSetChanged();//更新ListView

原创粉丝点击