Programmatically scroll to the top of a NestedScrollView

lukas1994 picture lukas1994 · Jun 24, 2015 · Viewed 69k times · Source

Is there a way to programmatically scroll to the top of a NestedScrollView by also triggering the scroll events for the parent? smoothScrollTo(x, y) doesn't delegate the scroll events to the NestedScrollingParent.

Answer

SilentKnight picture SilentKnight · Jul 10, 2015
NestedScrollView.scrollTo(0, 0);