码迷,mamicode.com
首页 > 其他好文 > 详细

手势检测的回调方法中onfling与onscroll的区别

时间:2015-03-17 19:46:32      阅读:154      评论:0      收藏:0      [点我收藏+]

标签:

onfling参数:

e1 The first down motion event that started the fling.

e2 The move motion event that triggered the current onFling.

velocityX The velocity of this fling measured in pixels per second along the x axis.

velocityY The velocity of this fling measured in pixels per second along the y axis.

onscroll参数:

e1 The first down motion event that started the scrolling.

e2 The move motion event that triggered the current onScroll.

distanceX The distance along the X axis that has been scrolled since the last call to onScroll. This is NOT the distance between e1 and e2. distanceY The distance along the Y axis that has been scrolled since the last call to onScroll. This is NOT the distance between e1 and e2.

从两者的参数可以看出 onfling强调滑动的速度, 适用于响应对速度有需求的事件

onscroll强调滑动的距离, 适用于响应对距离有需求的事件

手势检测的回调方法中onfling与onscroll的区别

标签:

原文地址:http://www.cnblogs.com/xuliangbk/p/4344968.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!