How can i make it once the ScrollView
is out of the screen it will auto scroll to the bottom?
Automatically scroll a web page down or up. If you are using a desktop or even a laptop with an external mouse, you just need to use the middle-clicking button of your mouse, and the entire webpage will scroll automatically.
Make sure the webpage is long enough so that the browser shows a scroll bar. Once there, to get to the bottom of the page, simply tap the top right corner on your device. In the screenshot below, I need to tap the area where the time is shown. The page will automatically scroll all the way down to the bottom.
Try this: scrollView. post(new Runnable() { @Override public void run() { scrollView. fullScroll(ScrollView.
To auto scroll a page from top to bottom we can use scrollTop() and height() method in jquery. In this method pass the document's height in scrollTop method to scroll.
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());
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With