How to restore Android ListView position? -
i used code save list view position. how can restore it?
view c = listview.getchildat(0); int scrolly = -c.gettop() + listview.getfirstvisibleposition() * c.getheight();
this looking:
onresume(){
refresh_your_data(); if(listview.getadapter()==null) // create adapter } else { //create method in adapter refresh list of data refill_data(listdata); adapter.notifydatasetchanged(); } }
Comments
Post a Comment