Ads

how to scroll to the beginning of a view on Android ?

Use this code in your java class.

your_scrollview.post(new Runnable() {
            @Override
            public void run() {
                your_scrollview.smoothScrollTo(0, your_view.getTop());
            }
        });

If you want to get new posts, make sure to subscribe to Value In Brief by Email.