Alex Zhukovich
alexzh.com
Alex Zhukovich
@alexzh.com
3/3 I realized this after spending some time improving my layout for the medium layout and checking it on a single device. We should design layouts based on screen sizes, not device types.

Does your application support foldable devices?
October 30, 2025 at 8:39 AM
2/3 Here's the problem:
Google's window size classes aren't device categories—they're viewport measurements. The Pixel 9 Pro Fold jumps straight from compact to expanded, never using medium.

On the other side, Samsung's Z Fold 5 uses medium.

Same device category, but different screen sizes.
October 30, 2025 at 8:39 AM
Your preview functions can be used not only for development but also as a tool to releasing apps without pixel imperfections.

Want to dive deeper into visual testing? Subscribe to my newsletter. Plus, you’ll be the first to know when my book on visual testing is released!

alexzh.com/

#AndroidDev
Mobile development with Alex
A blog about Android development & testing, Best Practices, Tips and Tricks
alexzh.com
October 23, 2025 at 4:30 AM
You now need only to make minor adjustments to implement visual tests.

Start strategically:
• Convert your design system and/or common components first
• Add preview functions for the most critical screens
• Gradually expand coverage to less critical screens
October 23, 2025 at 4:30 AM
But if you are already using Jetpack Compose, you can use ComposablePreviewScanner or the Compose Preview Screenshot Testing framework to transform your preview functions into visual tests.

You likely already created a preview function, which was the hard part.
October 23, 2025 at 4:30 AM
3. Number formatting varies between countries.

Let's compare:

• US: 12,345,678.9
• FR: 12 345 678,9

Use "NumberFormat.getNumberInstance(locale)." for number formatting.

Which of these has caused issues in your apps?
September 17, 2025 at 7:05 AM
2. Date formats are often a reason for user confusion.

Is "01/02/2025" January 2nd or February 1st? Actually, it depends on the locale.

• US: MM/DD/YYYY
• UK: DD/MM/YYYY

Use "DateTimeFormatter" to format dates based on locale.

Apply a similar approach to time formatting.
September 17, 2025 at 7:05 AM
1. Currency formatting differs by country:

• US: $1,234.56
• DE: 1.234,56 €

Use "NumberFormat.getCurrencyInstance(locale)" for proper currency symbol positioning.
September 17, 2025 at 7:05 AM
MaterialShapes  |  API reference  |  Android Developers
developer.android.com
July 13, 2025 at 3:47 PM
Add this dependency to use the component:
implementation("androidx.compose.material3:material3-android:1.4.0-alpha15")
June 17, 2025 at 4:30 AM