Standard Swipe Fling?
I hav开发者_JS百科e a GestureDetector to capture onFling events. Now I'm just using if velocityX > 150... then right to left swipe, it's a bit subjective and doesn't work all that well. I was wondering if there was a system standard for detecting right->left and left->right swipe flings?
You can try using the default ViewConfiguration setting.
final ViewConfiguration configuration = ViewConfiguration
.get(getContext());
mMinimumVelocity = configuration.getScaledMinimumFlingVelocity();
精彩评论