包含 ListView 的视图上的 Touchstart、-end 和 -move 事件

Touchstart, -end and -move events on a View containing a ListView

我基本上是这样的布局:

<Window>
  <View id="header" />
  <View id="content">
    <ListView />  
  </View>
</Window>

现在我想要的是在拖动 ListView 时为 header 视图设置动画。我尝试在 content 上设置 touchstart touchendtouchmove 事件。我还需要 ListView 可以点击...

有什么想法吗?

touchStart 不是 ListView 支持的事件。因此,您根本不会从列表视图中接收到该事件。

您可以查看 documentation 以了解 ListView 支持哪些事件。

因为您的 ListView 嵌套在视图中并不意味着您将获得父视图的事件。因为 ListView 使用您的 touchInput,所以只会触发 ListView 支持的事件。

还有其他事件可用于 ListView,它们可能很有用,例如 scrollStart