It needs to be done as following:
getScrollView().post(new Runnable() { @Override public void run() { getScrollView().fullScroll(ScrollView.FOCUS_DOWN); } });
This way the view is first updated and then scrolls to the "new" bottom.
Put the following code after your data is added:
final ScrollView scrollview = ((ScrollView) findViewById(R.id.scrollview));scrollview.post(new Runnable() { @Override public void run() { scrollview.fullScroll(ScrollView.FOCUS_DOWN); }});
This works for me:
scrollview.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() { @Override public void onGlobalLayout() { scrollview.post(new Runnable() { public void run() { scrollview.fullScroll(View.FOCUS_DOWN); } }); }});