How can i make it once the ScrollView
is out of the screen it will auto scroll to the bottom?
Asked
Active
Viewed 1.2k times
7

Edric
- 24,639
- 13
- 81
- 91

user1239315
- 95
- 1
- 1
- 11
-
See http://stackoverflow.com/questions/3307267/how-to-scroll-to-bottom-in-a-scrollview-on-activity-startup – Clément Mar 05 '12 at 15:09
3 Answers
9
Try below code to achieve your task :-
scroll.fullScroll(View.FOCUS_DOWN);
or
ScrollView sv = (ScrollView)findViewById(R.id.scrl);
sv.scrollTo(0, sv.getBottom());

duggu
- 37,851
- 12
- 116
- 113
-
-
yes, finally I controlled the time by using a runnable by internals. that the right way, right? – Mahdi Jul 08 '15 at 09:33
0
The below code should work
scrollView.post {
scrollView.fullScroll(View.FOCUS_DOWN)
}

Achintha Isuru
- 2,662
- 18
- 24
0
scrollView.post(new Runnable() {
@Override
public void run() {
scrollView.fullScroll(View.FOCUS_DOWN);
}
});
This worked for me

Jaufarusadique
- 1
- 1