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?