java - Official way to scroll to bottom (including footer) in listview -


i need programmatically show end of whole listview including footer.

// works sometimes, not // strange, is, unoficiall way this. listview.setselection(listview.getcount()-1);  

is there official way android developers can immidiatelly scroll/go bottom edge of listview content?

this basic thing should in docs, can't find.. docs , stackoverflow says nothing, lets change it.

thanks help.

other thing why works sometimes? (setselection way)

if put child listview contains "1: text" , setvisibility visible of footer-child , scroll bottom works, if last listview-child contains "2: text" instead of "1: text" doesn't works.. really strange.

edit2:

find out when setselection way not work. when type keyboard editview, after when try scroll bottom setselection, ignore job, or @ least ignore footer (so bottom reached then)

setselection() select row, same clicking on it.

just use

smoothscrolltoposition(int position) 

like:

listview.smoothscrolltoposition(listview.getmaxscrollamount()); 

hope works.


Comments