Android的滚动型,确认当前的滚动 [英] Android ScrollView, check if currently scrolling
问题描述
有没有一种方法来检查,如果滚动型标准目前正在滚动?
Is there a way to check if a standard ScrollView is currently being scrolled?
如果方向是向上或向下无所谓,我只需要检查它是否是目前在所有的滚动。
Doesn't matter if the direction is upwards or downwards, i only need to check whether it's currently being scrolled at all.
推荐答案
滚动型
以目前的形式用于检测滚动事件不提供回调。有两种解决方法可供选择:
ScrollView
in its current form does not provide a callback for detecting scroll events. There are two workarounds available:
1 使用的ListView
和实施的 OnScrollListener
。
1. Use a ListView
and implement OnScrollListener
.
2 从现有的滚动型
实施派生自定义类和<一个href=\"http://stackoverflow.com/questions/3948934/synchronise-scrollview-scroll-positions-android/3952629#3952629\">extend它提供的回调,滚动事件的。
2. Derive a custom class from the existing ScrollView
implementation and extend it to provide callbacks for scroll events.
这篇关于Android的滚动型,确认当前的滚动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!