I am displaying some data in a ScrollView. On activity startup (method onCreate) I fill the ScrollView with data and want to scroll to the bottom.
I tried to use
This is the best way of doing this.
scrollView.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() { @Override public void onGlobalLayout() { scrollView.post(new Runnable() { @Override public void run() { scrollView.fullScroll(View.FOCUS_DOWN); } }); } });