手势检测的回调方法中onfling与onscroll的区别
onfling參數(shù):
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參數(shù):
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.
從兩者的參數(shù)可以看出 onfling強調(diào)滑動的速度, 適用于響應對速度有需求的事件
onscroll強調(diào)滑動的距離,?適用于響應對距離有需求的事件
轉(zhuǎn)載于:https://www.cnblogs.com/xuliangbk/p/4344968.html
總結(jié)
以上是生活随笔為你收集整理的手势检测的回调方法中onfling与onscroll的区别的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 北邮考研
- 下一篇: Tasker文件夹说明