public GooglePhotosGestureDetector(@Nullable Context context, @NonNull GooglePhotosGestureListener listener) {
this.gestureListener = listener;
gestureHandler = new GestureHandler();
if (context == null) {
MIN_FLING_VELOCITY = ViewConfiguration.getMinimumFlingVelocity();
MAX_FLING_VELOCITY = ViewConfiguration.getMaximumFlingVelocity();
DOUBLE_TAP_SLOP = 100;
SCALE_SPAN_SLOP = 16;
} else {
ViewConfiguration config = ViewConfiguration.get(context);
MIN_FLING_VELOCITY = config.getScaledMinimumFlingVelocity();
MAX_FLING_VELOCITY = config.getScaledMaximumFlingVelocity();
DOUBLE_TAP_SLOP = config.getScaledDoubleTapSlop();
SCALE_SPAN_SLOP = config.getScaledTouchSlop() * 2;
}
}
GooglePhotosGestureDetector.java 文件源码
java
阅读 23
收藏 0
点赞 0
评论 0
项目:XphotoView
作者:
评论列表
文章目录