GooglePhotosGestureDetector.java 文件源码

java
阅读 23 收藏 0 点赞 0 评论 0

项目:XphotoView 作者:
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;
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号