尊重自己动画中的动画师持续时间比例 [英] respect animator duration scale in own animation

查看:53
本文介绍了尊重自己动画中的动画师持续时间比例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何在自己的动画中遵守动画师持续时间比例设置?我可以阅读设置并将其乘以我的持续时间吗,或者对此有什么好的方法?

how can I respect the animator duration scale setting in own animations? Can I read the setting and multiply it to my duration or what is a good way for this?

推荐答案

您可以尝试执行以下操作:

You can try something like this:

    final float animatorSpeed;
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
        animatorSpeed = Settings.Global.getFloat(
                context.getContentResolver(),
                Settings.Global.ANIMATOR_DURATION_SCALE,
                0);
    } else {
        animatorSpeed = Settings.System.getFloat(
                context.getContentResolver(),
                Settings.System.ANIMATOR_DURATION_SCALE,
                0);
    }

这篇关于尊重自己动画中的动画师持续时间比例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆