Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何检测 a 何时ListView滚动?
ListView
我尝试将ListViewa包装起来ScrollView并scroll在ScrollView. 不工作。
ScrollView
scroll
我在 ListView 上使用 PanGesture 来捕捉用户向上或向下滚动的时间。
const panEvent$ = fromEvent(this.listView, 'pan').pipe(map( (event: PanGestureEventData) => event.deltaY ));
这将采用我的 listView 属性,并且只发出 Y 值。然后,如果 Y 大于 0,您可以确定它们是向上还是向下移动