How to get the current Y offset of a ScrollView

后端 未结 5 1793
我寻月下人不归
我寻月下人不归 2020-12-04 23:46

ScrollView has a method for setting the x and y scroll offset, but no method for getting the current offset (all I\'m really interested is the y offset, since ScrollView onl

5条回答
  •  南方客
    南方客 (楼主)
    2020-12-05 00:08

    Call getScrollY() on the ScrollView

    See here for the documentation: http://developer.android.com/reference/android/view/View.html#getScrollY%28%29

提交回复
热议问题