horizontalScrollView.getViewTreeObserver().addOnGlobalLayoutListener(new OnGlobalLayoutListener() { public void onGlobalLayout() { horizontalScrollView.scrollTo(view5.getLeft()); } });
This waits until the views are measured, then scrolls to the view5 coordinates.
Did not check it, but it should work.
source share