Listview Scroll to the end of the list after updating the list
Supposing you know when the list data has changed, you can manually tell the list to scroll to the bottom by setting the list selection to the last row. Something like:
private void scrollMyListViewToBottom() {
myListView.post(new Runnable() {
@Override
public void run() {
// Select the last row so it will scroll into view...
myListView.setSelection(myListAdapter.getCount() - 1);
}
});
}
You need to use these parameters in your list view:
Scroll
lv.setTranscriptMode(ListView.TRANSCRIPT_MODE_ALWAYS_SCROLL);
Set the head of the list to it bottom
lv.setStackFromBottom(true);
You can also set these parameters in XML, eg. like this:
<ListView
...
android:transcriptMode="alwaysScroll"
android:stackFromBottom="true" />