Android, ListView IllegalStateException: “The content of the adapter has changed but ListView did not receive a notification”

后端 未结 25 2507
执念已碎
执念已碎 2020-11-22 16:59

What I want to do: run a background thread which calculates ListView contents and update ListView partially, while results are calculated.

W

25条回答
  •  北荒
    北荒 (楼主)
    2020-11-22 17:36

    i haved same problem when add new data in lazy image loader i just put

             adapter.notifyDataSetChanged();
    

    in

           protected void onPostExecute(Void args) {
            adapter.notifyDataSetChanged();
            // Close the progressdialog
            mProgressDialog.dismiss();
             }
    

    hope it helps you

提交回复
热议问题