Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I make ScrollView auto scroll to the bottom?

How can i make it once the ScrollView is out of the screen it will auto scroll to the bottom?

like image 405
user1239315 Avatar asked Mar 05 '12 02:03

user1239315


People also ask

How do I automatically scroll down?

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.

How do I scroll to the bottom of the page on Android?

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.

How do I scroll Nestedscrollview to bottom programmatically?

Try this: scrollView. post(new Runnable() { @Override public void run() { scrollView. fullScroll(ScrollView.

How do I auto scroll to the bottom in HTML?

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.


1 Answers

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());
like image 185
duggu Avatar answered Oct 19 '22 23:10

duggu