android - after refreshing listview it shows first position data -
i have long listview user can scroll around. refreshing listview after every 30 seconds, listview refresh succesfully. there 1 issue want list scrolled same point before refreshing. because if list refresh shows first position.
i 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(); homecoming "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 appreciated.thanks in advance
try utilize setselectionfromtop() set position visible state.
android android-layout
No comments:
Post a Comment