ViewBouncer.java 文件源码

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

项目:CmoaQuiz 作者:
@Override
public void run() {

    if (mView != null && mView.getWidth() != 0 && mView.getHeight() != 0) {

        if (bounceViewAnimation != null && !bounceViewAnimation.hasEnded()) {
            return;
        }

        bounceViewAnimation = new ScaleAnimation(1f, mRatio, 1f, mRatio, mView.getWidth() / 2, mView.getHeight() / 2);

        // Define the parameters of the animation
        bounceViewAnimation.setDuration(mTime);
        bounceViewAnimation.setInterpolator(new CycleInterpolator(0.5f));
        mView.setVisibility(View.VISIBLE);
        mView.startAnimation(bounceViewAnimation);
    }

    if (mInfiniteBounce) {
        bounceViewHandler.postDelayed(bounceViewRunnable, 2000);
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号