I'm working on a custom indeterminate spinner, I browsed through the SDK for some pointers and found the indeterminate spinner xml 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 a drawable in my own project I get errors about android:framesCount
and android:framesDuration
. After looking on Google for a while I found this link to an issue report.
My questions is: 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 rotate smooth?
Have you looked at the answer to this question? How to make a smooth image rotation in Android It appears that you are having the same issue. He doesn't use the following:
android:framesCount="12" android:frameDuration="100"
Since it appears to be internal I would recommend going about it the way he did.
Hope this helps.
I replaced animated-rotate with rotate
<rotate xmlns:android="http://schemas.android.com/apk/res/android"
android:drawable="@drawable/ic_loading"
android:pivotX="50%"
android:pivotY="50%" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With