I understand that there is a lot of information on this issue, but I can’t get the code to work correctly.
I load the data in portions from the server, display it in a list. when scrolling down, new data portions are loaded. I load the data in AsyncTask. Here is a sample code:

listView.setOnScrollListener(new OnScrollListener() { public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) { int lastScreen = firstVisibleItem + visibleItemCount; if ((lastScreen) == totalItemCount) { if ((from + number) <= totalItemCount) { from = totalItemCount; mt = (MyTask) getLastNonConfigurationInstance(); if ( mt == null ){ mt = new MyTask(); mt.execute(); } mt.link(this); } } } public void onScrollStateChanged(AbsListView view, int scrollState) {} }); 

I turn the emulator - a white screen. What cant?

  • one
    "scroll" this white screen with your finger, will it appear? I think the jamb is that the code is not where it is necessary, it is necessary to go to the Rescue to get the "old" stream - Gorets
  • Can I show how it will look on the code? - Stas0n


1 answer 1

Maybe this asynctask-rotate-display article will help you.