RadialSelectorView.java 文件源码

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

项目:boohee_v5.6 作者:
public ObjectAnimator getReappearAnimator() {
    if (this.mIsInitialized && this.mDrawValuesReady) {
        int totalDuration = (int) (((float) 500) * (1.0f + ChartZoomer.ZOOM_AMOUNT));
        float delayPoint = (((float) 500) * ChartZoomer.ZOOM_AMOUNT) / ((float) totalDuration);
        float midwayPoint = 1.0f - ((1.0f - delayPoint) * 0.2f);
        Keyframe kf0 = Keyframe.ofFloat(0.0f, this.mTransitionEndRadiusMultiplier);
        Keyframe kf1 = Keyframe.ofFloat(delayPoint, this.mTransitionEndRadiusMultiplier);
        Keyframe kf2 = Keyframe.ofFloat(midwayPoint, this.mTransitionMidRadiusMultiplier);
        Keyframe kf3 = Keyframe.ofFloat(1.0f, 1.0f);
        PropertyValuesHolder radiusReappear = PropertyValuesHolder.ofKeyframe
                ("animationRadiusMultiplier", new Keyframe[]{kf0, kf1, kf2, kf3});
        kf0 = Keyframe.ofFloat(0.0f, 0.0f);
        kf1 = Keyframe.ofFloat(delayPoint, 0.0f);
        kf2 = Keyframe.ofFloat(1.0f, 1.0f);
        PropertyValuesHolder fadeIn = PropertyValuesHolder.ofKeyframe("alpha", new
                Keyframe[]{kf0, kf1, kf2});
        ObjectAnimator reappearAnimator = ObjectAnimator.ofPropertyValuesHolder(this, new
                PropertyValuesHolder[]{radiusReappear, fadeIn}).setDuration((long) totalDuration);
        reappearAnimator.addUpdateListener(this.mInvalidateUpdateListener);
        return reappearAnimator;
    }
    Log.e(TAG, "RadialSelectorView was not ready for animation.");
    return null;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号