how can I respect the animator duration scale setting in own animations? Can I read the setting and multiply it to my duration or what is a good way for this?
However, turning off animations completely may cause bugs in some apps. If that happens to you, speed up the animations to the fastest level, which is the lowest number. Animations also drain the battery on your device faster.
Should I disable animations in Android developer options? Disabling the animations would give you at least this advantage: you'll save some work of your CPU (or even the GPU) that will not have to do this task (of animating things on the screen) anymore.
For example, when you tap an option in your smartphone's settings or back out of a menu. Animator duration scale changes the speed of pretty much every other animation that happens within the OS. That includes opening and closing apps, pulling down your notification shade, and so on.
Method 1: Developer Options If you're a little more tech oriented then most, you most likely know what the developer options are all about. Using these options, you can change the animation duration scale of transitions, windows, and general animations.
You can try something like this:
final float animatorSpeed;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
animatorSpeed = Settings.Global.getFloat(
context.getContentResolver(),
Settings.Global.ANIMATOR_DURATION_SCALE,
0);
} else {
animatorSpeed = Settings.System.getFloat(
context.getContentResolver(),
Settings.System.ANIMATOR_DURATION_SCALE,
0);
}
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