I load the data from the server in batches. New portions are loaded when scrolling the screen. I load using AsyncTask.
The list has simple elements and group elements. If you click on the group, another activity opens, in which only the group elements are loaded.
The problem is this: I go to the group, go out, I go to another group and the error flies:
java.lang.IllegalStateException: the notification has been changed. It is not modified.
I still can not understand how to fix it .. Here is my AsyncTask
class MyTask extends AsyncTask<String, Integer, Void> { protected ProgressBar proBar; protected TextView proText; @Override protected void onPreExecute() { proBar = (ProgressBar) findViewById(R.id.progress_bar); proBar.setVisibility(View.VISIBLE); proText = (TextView) findViewById(R.id.progress_bar_text); proText.setText("loading..."); proText.setVisibility(View.VISIBLE); } @Override protected Void doInBackground(String... params) { // TODO ссылка ReadStringJson rsj = new ReadStringJson(SERVER_URL_1 + SERVER_PATH_2 + SERVER_PATH_3 + GROUP + "&from=" + (from + 1) + "&number=" + number + SERVER_PATH_4 + FILTER); try { parsingData(rsj.readFromServer()); } catch (IOException ex) { Log.e("IOException: ", ex.toString()); ex.printStackTrace(); } catch (JSONException ex) { Log.e("JSONException: ", ex.toString()); ex.printStackTrace(); } return null; } @Override protected void onPostExecute(Void result) { super.onPostExecute(result); adapter.addEnginesNames(names); adapter.addEnginesDescriptions(descriptions); adapter.addEnginesLogoUrl(logoUrl); adapter.addIsGroup(isGroup); adapter.notifyDataSetChanged(); } }