I’m doing this in an AsyncTask, everything working fine but my view is not directly refreshed,
but if i just scroll a bit on my listView the data are refreshed
ArrayList<Project> listProject = taskLiteApplication.getListProjectWithStatus(Integer.parseInt(status[0]));
//set adapter
projectBaseAdapter.replaceData(listProject);
//display projects on screen
projectBaseAdapter.notifyDataSetChanged();
I try to call refreshDrawableState() on my listView and it doesn’t work as well
and invalidate() too
Any UI updates from an AsyncTask should be done in the
onPreExecuteand theonPostExecutemethods of the AsyncTask class.So in your case, after your AsyncTask is complete, you want to update the UI. Therefore you should override the
onPostExecutemethod of your AsyncTask , and in that method callprojectBaseAdapter.notifyDataSetChanged();