How to Programmatically Scroll a ScrollView to Bottom
This doesn't actually answer your question. But it's an alternative which pretty much does the same thing.
Instead of Scrolling to the bottom of the screen, change the focus to a view which is located at the bottom of the screen.
That is, Replace:
scroll.scrollTo(0, scroll.getBottom());
with:
Footer.requestFocus();
Make sure you specify that the view, say 'Footer' is focusable.
android:focusable="true"
android:focusableInTouchMode="true"
You need to use the message queue or else it won't work. Try this:
scrollView.post(new Runnable() {
@Override
public void run() {
scrollView.fullScroll(ScrollView.FOCUS_DOWN);
}
});
This is what worked for me.