NestedScrollView's fullScroll(View.FOCUS_UP) not working properly

后端 未结 4 1603
面向向阳花
面向向阳花 2020-12-10 05:12

I have a NestedScrollView populated with a vertical LinearLayout, which itself has a bunch of children of various view types: multiple TextViews, two static GridViews, and e

4条回答
  •  时光说笑
    2020-12-10 05:50

    This code works for me.

    scrollView.post {
        scrollView.fling(0)
        scrollView.fullScroll(ScrollView.FOCUS_UP)
    }
    

提交回复
热议问题