How to scroll to top of long ScrollView layout?

Try

mainScrollView.fullScroll(ScrollView.FOCUS_UP);

it should work.


Had the same issue, probably some kind of bug.

Even the fullScroll(ScrollView.FOCUS_UP) from the other answer didn't work.
Only thing that worked for me was calling scroll_view.smoothScrollTo(0,0) right after the dialog is shown.


i had the same problem and this fixed it. Hope it helps you.

listView.setFocusable(false);