How to scroll to the bottom of ListView programmatically?

I know that this has been answered and you took the answer and it was more than a year ago. But a better way to do this is Transcript Mode. For a demo, see the Android API Demo under Views > Lists > Transcript.

You would set the following on your list view in the XML.

android:stackFromBottom="true"
android:transcriptMode="alwaysScroll"

It will always work whenever you call notifyDataSetChanged(). You can set android:transcriptMode to normal instead if you want an even better result for chat applications: it will scroll to the bottom only if the last item was already in view. That way your users can view the previous chat without interruption when other users chat.

  • transcript mode
  • stack from bottom

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)