android - Listview: smooth scroll to bottom -
when button clicked, app smoothly scroll bottom of listview. implementation (kotlin)
listview.post { listview.smoothscrolltoposition(adapter.count - 1) }
however, not work properly: list items contain expandable parts (i.e. view visibility can visible or gone), hidden. when these parts expanded however, function not scroll end, position before end.
how can reliably scroll end of listview?
try following. solve problem, tried , works great.
listview.post(new runnable(){ public void run() { listview.setselection(listview.getcount() - 1); }});
Comments
Post a Comment