android scrollview automatically scrolls to the top or bottom
Summary: android scrollview automatically scrolls to the top or bottom
android scrollview automatically scrolls to the top or bottom
//Set default scroll to top (new Runnable() { @Override public void run() { // TODO Auto-generated method stub (ScrollView.FOCUS_UP); } });
//Set default scroll to bottom (new Runnable() { @Override public void run() { // TODO Auto-generated method stub (ScrollView.FOCUS_DOWN); } });
Another method is to set the first control in the scrollview
android:focusable="true" android:focusableInTouchMode="true"
Thank you for reading, I hope it can help you. Thank you for your support for this site!