问题解决:The content of the adapter has changed but ListView did not receive a notification

1. 不要在后台线程中直接调用adapter

2. 不要在后台线程中修改adapter绑定的数据

如果对adapter或者adapter绑定的数据是在线程中,加上runOnUiThread就可以了

runOnUiThread(new Runnable(){

        public void run(){

                //修改数据

              datalist.add(......);

              //notify

               adapter.notifyDataSetChanged();

    }

}

 

posted on 2014-05-13 09:00  dflower  阅读(3302)  评论(0编辑  收藏  举报