I have a long ListView that the user can scroll around. I am refreshing this listview after every 30 seconds, listview refresh succesfully. But there is one issue that I want the list to be scrolled to the same point that it was previously before refreshing. Because now if list refresh then it shows the first position.
I am updating list through AsynchronousTask as:
private class HttpTask extends AsyncTask<String, Boolean, String> {
@Override
protected String doInBackground(String... params) {
System.out.println("inside doInBackground>>!!>>> ");
getResponse();
return "Executed";
}
@Override
protected void onProgressUpdate(Boolean... progress) {
}
@Override
protected void onPostExecute(String result) {
// publishProgress(false);
System.out.println("post excute funt***********");
setListAdapter(new ListAdapter(getApplicationContext(),
R.layout.mylist, dataArr));
}
}
Any help will be appreciated.Thanks in advance