开发者

Android Listview notifyDataSetChanged() 不起作用的解决方案

android Listview notifyDataSetChanged() 不起作用

private ArrayList<phpMap<String, String>> data = new ArrayList<Map<String, String>>();  
private ArrayList<Map<String, String>> delivered_data= new ArrayList<Map<String, String>>();  

如果直接将arraylist 的数据直接复制,无法完成更新

data = delivered_data;
编程adapter.notifyDataSetChanged();

单个元素改变时候,可以更新

data.get(position).put("status", Select[0]);  //change the status 
adapter.notifyDataSetChanged();

如果要以数据list直接传递,需要用下面方法

 data.clear();
 data.addAll(delivered_data);
 adapter.notif编程客栈yDataSetChanged();

更改listview用js到下面项目中:

Android Listview notifyDataSetChanged() 不起作用的解决方案

到此这篇关于Android Listview notifyDataSetChanged() 不起作用的文章就介绍到这了,更多相关Android jsListview notifyDataSetChanged内容请搜索编程客栈(www.devze.com)以前的文章或继续浏览下面的相关文章希望大家以后多多支持编程客栈(www.devze.com)!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新开发

开发排行榜