Custom spinner animation not smooth enough: frameCount and frameDuration error

I am working on a custom undefined counter, I looked at the SDK for some pointers and found an undefined xml accelerator file made by Google:

<?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" /> 

When I use this as drawable in my own project, I get errors about android:framesCount and android:framesDuration . After looking at Google for a while, I found this link in the problem report.

My questions: is there any workaround so I can still use android:framesCount and android:framesDuration ? Or is there any other way I can make my custom spinner spin smoothly?

+8
android android-layout android-progressbar android-animation
source share
1 answer

Have you looked at the answer to this question? How to make smooth image rotation in Android . It looks like you have the same problem. He does not use the following:

Android: framesCount = "12" android: frameDuration = "100"

Since it seems to be internal, I would recommend doing what he did.

Hope this helps.

+1
source share

All Articles