你能告诉我如何按高度滚动视图的百分比滚动到位置吗?
此代码知道滚动时的百分比,但如果百分比已知,如何获取 y?
val scrollViewHeight = v.getChildAt(ZERO).bottom - v.height
val getScrollY = v.scrollY
val scrollPosition = getScrollY / scrollViewHeight * 100
Log.i("scrollview", "scroll Percent Y: $scrollPosition")
谢谢:)