The exception suggests me to call the notifyDataSetChanged(), but I already call that method on my onPostExecute method, as you can see:
Constants.newsDownloaded = true;
TempStorage.downloadedNews = this.items;
this.progress.setVisibility(View.INVISIBLE);
this.downloadMore.setVisibility(View.VISIBLE);
adapter = new NewsListAdapter(context,
inflater, this.items);
if (index <= 26){
listView.setSelection(0);
} else{
listView.setSelection(TempStorage.firstAddedIndex);
}
listView.setAdapter(adapter);
adapter.notifyDataSetChanged();
The adapter is recreated at every call as you can see. I've got this problem only on the Nexus 5, on the others devices works flawlessly.
What's wrong with this code?
Thanks for the help, guys!