android - Updating ListView from AsyncTask called from custom adapter class
问题 I am trying to update a ListView from an AsyncTask. I have this situation: Activity Class creates the list adapter from a custom Adapter class. Adapter class sets onClickListener on element from list item, and calls an AsyncTask located in a different Utilities class. How can I call notifyDataSetChanged from onPostExecute() method in the Utilities AsyncTask? 回答1: Include a Delegate as a callback to activate the refresh from within the original class. For example, add this interface: public