ViewDragHelper.java 文件源码

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

项目:boohee_v5.6 作者:
private ViewDragHelper(Context context, ViewGroup forParent, Callback cb) {
    if (forParent == null) {
        throw new IllegalArgumentException("Parent view may not be null");
    } else if (cb == null) {
        throw new IllegalArgumentException("Callback may not be null");
    } else {
        this.mParentView = forParent;
        this.mCallback = cb;
        ViewConfiguration vc = ViewConfiguration.get(context);
        this.mEdgeSize = (int) ((20.0f * context.getResources().getDisplayMetrics().density) + 0.5f);
        this.mTouchSlop = vc.getScaledTouchSlop();
        this.mMaxVelocity = (float) vc.getScaledMaximumFlingVelocity();
        this.mMinVelocity = (float) vc.getScaledMinimumFlingVelocity();
        this.mScroller = ScrollerCompat.create(context, sInterpolator);
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号