Programmatically scroll to the top of a NestedScrollView

后端 未结 13 1626
情书的邮戳
情书的邮戳 2020-12-13 12:02

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)

13条回答
  •  隐瞒了意图╮
    2020-12-13 12:34

    Another way to smooth scroll NestedScrollView to all the way up or down is using fullScroll(direct) function

    nestedScrollView.fullScroll(View.FOCUS_DOWN);
    nestedScrollView.fullScroll(View.FOCUS_UP);
    

提交回复
热议问题