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

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

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

若是对adapter或者adapter绑定的数据是在线程中,加上runOnUiThread就能够了后台

runOnUiThread(new Runnable(){数据

        public void run(){data

                //修改数据new

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

              //notifyab

               adapter.notifyDataSetChanged();

    }

}

相关文章
相关标签/搜索