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

Popular posts from this blog

symfony - InvalidConfigurationException in SecurityExtension.php line 429: No authentication listener registered for firewall "secured_area" -

angular ui router - 10 digest iterations reached in angularjs when using $state.go -

javascript - Handling constructor related functions while testing with mocha and sinon -