首页 > 其他 > 详细

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

时间:2015-03-17 19:45:18      阅读:464      评论: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
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!