i did more debuggin and manage to find out that the error was caused by listviews with the error: "java.lang.IllegalStateException: The content of the adapter has changed but ListView did not receive a notification....."
what is the most common cause of this.
I am using an async task to load my data and then set it to an adapter.
m_adapter is an adapter that stores more arrayadapters.(seperator pattern)
enter code here
//inner class
private class GetTasks extends AsyncTask<Void,Void,Void>{
private final ProgressDialog m_ProgressDialog = new ProgressDialog(PerspectiveTasks.this);
@Override
protected void onPreExecute(){
this.m_ProgressDialog.setTitle("Get Tasks");
this.m_ProgressDialog.setMessage("Retrieving Tasks. Please be patient...");
this.m_ProgressDialog.show();
}
@Override
protected Void doInBackground(Void... arg0) {
m_adapter.sections.clear();
m_adapter.headers.clear();
try{
m_tasks = TaskInTasklist.getTasksInList(PerspectiveTasks.this, parent_id,PerspectiveTasks.task_filter,Global.DUE_OVERDUE,null,null).getTasks();
if(m_tasks.size()>0){
TaskAdapter taOverDue = new TaskAdapter(PerspectiveTasks.this, R.layout.row_task_item_1,m_tasks,parent_state);
m_adapter.addSection("Overdue", taOverDue);
}
}catch(Exception e){
Toast.makeText(PerspectiveTasks.this,e.getMessage(), Toast.LENGTH_LONG).show();
}
return null;
}
@Override
protected void onPostExecute(final Void unused){
try{
ListView li = (ListView) findViewById(R.id.perspective_tasks_task_list);
li.setAdapter(m_adapter);
m_adapter.notifyDataSetChanged();
this.m_ProgressDialog.dismiss();
}catch(Exception e){
Toast.makeText(PerspectiveTasks.this,e.getMessage(), Toast.LENGTH_LONG).show();
}
}
}