34

android – 自定义微调器动画不够流畅:framesCount和frameDuration错误

 5 years ago
source link: https://codeday.me/bug/20190112/505404.html?amp%3Butm_medium=referral
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

我正在研究一个自定义的不确定微调器,我浏览了SDK以获得一些指示,并找到了由Google制作的不确定的微调器xml文件:

<?xml version="1.0" encoding="utf-8"?>
<animated-rotate xmlns:android="http://schemas.android.com/apk/res/android"
android:drawable="@drawable/spinner_black_16"
android:pivotX="50%"
android:pivotY="50%"
android:framesCount="12"
android:frameDuration="100" />

当我在我自己的项目中使用它作为drawable我得到关于android:framesCount和android:framesDuration的错误.在Google上查看了一段时间后,我发现 this 链接到问题报告.

我的问题是:有没有解决方法所以我仍然可以使用android:framesCount和android:framesDuration?或者还有其他方法可以让我的自定义微调器旋转平滑吗?

你看过这个问题的答案了吗? How to make a smooth image rotation in Android

您似乎遇到了同样的问题.他没有使用以下内容:

机器人:framesCount = “12”

机器人:frameDuration = “100”

由于它似乎是内部的,我建议按照他的方式去做.

希望这可以帮助.

翻译自:https://stackoverflow.com/questions/10011138/custom-spinner-animation-not-smooth-enough-framescount-and-frameduration-error


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK