I have two buttons that switching to the next list of events and the previous one.
When I go to next\\previous event, scrolls remains somewhere below. But I need to
The timing of these calls is crucial. getViewTreeObserver().addOnGlobalLayoutListener didn't work for me but using the onWindowFocusChanged callback in my activity did:
@Override
public void onWindowFocusChanged(boolean hasFocus) {
super.onWindowFocusChanged(hasFocus);
if (hasFocus) {
mScrollView.fullScroll(View.FOCUS_UP);
}
}