Android   发布时间:2022-04-28  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了android – 如何设置PropertyAnimation的帧速率?大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
Android documentation表示您可以设置刷新率:

但是,它没有告诉你如何.我到处搜索,但在ObjectAnimator,PropertyAnimator或Animator中没有这样的方法.

编辑:我目前正在使用动画更新程序,每5帧仅响应一次 –

colorFade.addupdateListener(new ValueAnimator.AnimatorupdateListener() {
       int interpolator = 0;

       @Override
       public void onAnimationupdate(ValueAnimator animation) {
           if ((interpolator++) % 5 == 0)
                invalidate(mHandlerBounds);
        }
  });

解决方法

正如@pskink所说,使用:

public static void setFrameDelay(long frameDelay)

ValueAnimator班.你可以在doc中看到这个:

大佬总结

以上是大佬教程为你收集整理的android – 如何设置PropertyAnimation的帧速率?全部内容,希望文章能够帮你解决android – 如何设置PropertyAnimation的帧速率?所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。