AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Android home screen animation4/14/2024 ![]() The animation duration scale is 0f if reduced motion-setting is enabled. One way to deduce if reduced motion is enabled is to check the animation duration scale. Since Android doesn't expose the value for reduced motion the same way as other accessibility services, such as if a screen reader is enabled, we need to be a little creative. How to Detect if Reduced Motion is Enabled You can turn the reduced motion setting on from the accessibility settings - the setting is called "Remove animations," and depending on your phone, it might be under "Display" or "Visibility enhancements" or other similar. So, there's no need for extra checks in many cases - at least if you're using the latest versions of, e.g., Compose. So in these cases, checking if reduced motion is on and displaying a static image instead is the way to go. Often animations start with an (almost) empty screen, which is not what you want to show users with reduced motion. However, sometimes the first frame is not applicable. I love how Lottie's Android component checks for reduced motion and displays the first frame if it's on - and all of this, out of the box. However, if you're using earlier versions, I'd recommend testing if the setting is respected out of the box.Īnother case when you need to know how to check if the reduced motion setting is on is if you're using something like Lottie-animations. I was surprised by how much motion and animation was being turned off by that setting!Īlso, when creating animations with Jetpack Compose, its animation classes follow that setting from version 1.2.0. The other week, I was developing a feature that required me to turn that setting off because of the animations. That means most of the animations you use are turned off by default. Reduced motion (or, animations off) -setting affects all Animator-based animations. When to Check the Reduced Motion Setting in Your Code? But I just hope "engagement" won't drive over the accessibility needs of the people - so that's why I'm trying to educate everyone about this topic. And animations are here to stay - they drive engagement (or that's what everyone keeps telling me), and some people like them. I've worked with multiple devs, designers, and product people who've had no idea about that. I know there's not much knowledge about the need for reduced motion. Nobody enjoys having a migraine or feeling sick after encountering something unexpected in the app - something that could have been prevented with a few lines of code. Sometimes not respecting that setting creates inconveniences, but sometimes it's about real, life-affecting symptoms that might get triggered. I mean, users have expectations on how apps work, and one of these expectations is that operating system-level settings are respected. I also discuss when you need to implement the check and when the animations are turned off by default.īut first, let's talk a bit about why you should care about respecting that setting. In this blog post, I'm talking about Android animations and how to respect that setting. On the other hand, in apps, it depends on how the animations are built. It entirely depends on the developers implementing the reduced motion-media query on the web. How about websites and apps, then? Do they respect that setting? Yes and no. When this setting is on, operating system level animations are turned off. ![]() I can turn motion off (or reduce it) with operating system settings on my phone and computer. There's an app for that! Or, rather, a setting. So, now you might wonder, how can I survive the internet today? Animations are everywhere. Especially when I'm tired, distraction is a huge problem. I was able to relate to that article on so many levels.įor me, animation and motion on a website or app can be a problem for two reasons: They might make me physically sick and distract me. smith: My war on animation as part of their Accessibility week, and I loved it. I don't like animations, and I'm not alone. How to Detect if Reduced Motion is Enabled.When to Check the Reduced Motion Setting in Your Code?.
0 Comments
Read More
Leave a Reply. |