Why does my android activity always start scrolled to the bottom?

前端 未结 11 900
萌比男神i
萌比男神i 2020-12-22 20:56

Whenever I start this activity, it always starts bottomed out--scrolled all the way to the bottom. I am not doing anything weird in the activity OnCreate (or anywhere for th

11条回答
  •  情话喂你
    2020-12-22 21:03

    scrollView.requestFocus(View.FOCUS_UP) solved my problem when I wanted the top view to be visible. Specifying direction parameter to the method requestFocus(int direction) is a good way to control the ScrollView position. More details here.

提交回复
热议问题