FloatingView.java 文件源码

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

项目:text_converter 作者:
AnimationTask() {
    if (mIsAnimationLocked)
        throw new RuntimeException("Returning to user's finger. Avoid animations while mIsAnimationLocked flag is set.");
    mDestX = calculateX();
    mDestY = calculateY();
    mDynamicUpdate = null;

    setAnimationFinishedListener(new AnimationFinishedListener() {
        @Override
        public void onAnimationFinished() {
            adjustInactivePosition();
        }
    });

    float velocityX = calculateVelocityX();
    float velocityY = calculateVelocityY();
    mTension += Math.sqrt(sqr(velocityX) + sqr(velocityY)) / 200;
    mInterpolator = new OvershootInterpolator(mTension);

    mCurrentPosX = mDestX;
    mCurrentPosY = mDestY;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号