Reduced animations on Android
Content which conveys a sense of motion can be a barrier for users. Certain groups, particularly those with attention deficit disorders, find moving content distracting, making it difficult for them to concentrate on other parts of your app. You should provide functionality to pause, stop or hide content which moves, blinks or scrolls automatically.
On Android, you should provide buttons to pause, stop or hide content. You could use the ANIMATOR_DURATION_SCALE
and/or TRANSITION_ANIMATION_SCALE
preferences to check if animations should be disabled. If either value is zero
, you could choose to disable (non-essential) animations in your app.
val duration = Settings.Global.getFloat(
context.getContentResolver(),
Settings.Global.ANIMATOR_DURATION_SCALE,
1f
)
val transition = Settings.Global.getFloat(
context.getContentResolver(),
Settings.Global.TRANSITION_ANIMATION_SCALE,
1f
)
if (duration == 0f || transition == 0f) {
// Disable animations
}