Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/226.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 调整SimpleOnGestureListener.onFling()灵敏度_Android_Android Gesture - Fatal编程技术网

Android 调整SimpleOnGestureListener.onFling()灵敏度

Android 调整SimpleOnGestureListener.onFling()灵敏度,android,android-gesture,Android,Android Gesture,我已经实现了SimpleOnGestureListener.onFling(),但我必须快速启动才能触发它。有没有办法让它更敏感 提前感谢…触发onFling()事件所需的灵敏度或“oomph”在GestureDetector中: if ((Math.abs(velocityY) > mMinimumFlingVelocity) || (Math.abs(velocityX) > mMinimumFlingVelocity)){ handled = mList

我已经实现了SimpleOnGestureListener.onFling(),但我必须快速启动才能触发它。有没有办法让它更敏感

提前感谢…

触发
onFling()
事件所需的灵敏度或“oomph”在GestureDetector中:

if ((Math.abs(velocityY) > mMinimumFlingVelocity)
        || (Math.abs(velocityX) > mMinimumFlingVelocity)){
    handled = mListener.onFling(mCurrentDownEvent, ev, velocityX, velocityY);
}
遗憾的是,没有现有的方法来更改私有成员
mmimumflingvelocity
。但是,您应该能够将整个GestureDetector类复制到项目中的一个新类中,并自己硬编码一个新值