'How to set a frame rate for animation?
I use animation to rotate an image and i have notice that on higher refresh rate phones (120Hz) the animation is faster.But the animation speeds up only on loading or when i touch a random layout. On phones that use adaptive refresh rate when i touch a layout the phone switches from 60hz to 90 or 120 and animation if speeded up. Has anyone notice this? Can i set a frame rate for that animation? this is my code:
Animation rotationAnimation = AnimationUtils.loadAnimation(this,R.anim.onoffbuttonrotation);
XML File:
<?xml version="1.0" encoding="utf-8"?>
<rotate
xmlns:android="http://schemas.android.com/apk/res/android"
android:fillAfter = "true"
android:fillEnabled = "true"
android:duration="60000"
android:fromDegrees="0"
android:interpolator="@android:anim/linear_interpolator"
android:pivotX="50%"
android:pivotY="50%"
android:repeatCount="infinite"
android:startOffset="0"
android:toDegrees="36000" />
Solution 1:[1]
try it with changing duration level.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | reddy |
