问题解决: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();

    }

}

原文地址:https://www.cnblogs.com/dflower/p/3724761.html