nestedScrollView.setOnScrollChangeListener(
NestedScrollView.OnScrollChangeListener { v, scrollX, scrollY, oldScrollX, oldScrollY ->
if (scrollY > oldScrollY) {
Log.i(TAG, "Scroll DOWN")
}
if (scrollY < oldScrollY) {
Log.i(TAG, "Scroll UP")
}
if (scrollY == 0) {
Log.i(TAG, "TOP SCROLL")
}
if (scrollY == v.getChildAt(0).measuredHeight - v.measuredHeight) {
Log.i(TAG, "BOTTOM SCROLL")
}
})
版权属于:
Kornan
作品采用:
《
署名-非商业性使用-相同方式共享 4.0 国际 (CC BY-NC-SA 4.0)
》许可协议授权
评论