Sign in

Alex Zhukovich

@alexzh.com
49 followers 54 following 141 posts

Android Engineer & author at alexzh.com.

PostsRepliesMedia
Alex Zhukovich @alexzh.com · 28/08/2026
New article: Handling asynchronous images in Android screenshot tests You'll learn how to: • Inject fake images using coil-test • Create a custom JUnit rule to code avoid duplication • Use inspection mode Both approaches give you deterministic tests. alexzh.com/handling-as...
alexzh.com
Handling Asynchronous Images in Android Screenshot Tests
This article is based on a chapter from my book, Mastering Android Screenshot Testing. Modern applications frequently load images asynchronously, which is a common cause of unstable screenshot tests or confusion when you review newly generated screenshots. A test can pass locally and fail on CI, produce a different image
000
Alex Zhukovich @alexzh.com · 09/07/2026
Mastering Android Screenshot Testing gets a new release next week, with 4 new chapters covering testing across devices & configurations, testing animations, and addressing common challenges. The price increases on release. Buy now and get the next updates for free. leanpub.com/mastering-a...
leanpub.com
Mastering Android Screenshot Testing
This comprehensive guide explores automated screenshot testing in Android development. Learn the fundamental principles, frameworks, and best practices to catch visual regressions across devices and configurations before they reach production.
000
Alex Zhukovich @alexzh.com · 07/07/2026
A few days ago, I spilled water on my laptop. It never turned back on. Wrote about what happened, and the simple backup checklist I use now: alexzh.com/laptop-back...
alexzh.com
My laptop died last week, and here is what it took with it
Last week I spilled water on my laptop. This is the story of what I lost, what I learned, and the 3-2-1 backup system I wish I'd had a week earlier.
000
Alex Zhukovich @alexzh.com · 02/07/2026
There are also predefined constants available for icon sizes: • MediumIconSize • LargeIconSize ⚠️ The medium option is available in version 1.5.0-alpha of the material3 library.
100
Alex Zhukovich @alexzh.com · 02/07/2026
Did you know there are multiple Floating Action Button components available in different sizes? • SmallFloatingActionButton • FloatingActionButton • MediumFloatingActionButton • LargeFloatingActionButton #AndroidDev #JetpackCompose
140
Alex Zhukovich @alexzh.com · 25/06/2026
5/ Do you have screenshot test your screens, components, both, or not yet? P.S: I recently published "Mastering Android Screenshot Testing," a hands-on guide to improving your app's visual quality. leanpub.com/mastering-a...
leanpub.com
Mastering Android Screenshot Testing
This comprehensive guide explores automated screenshot testing in Android development. Learn the fundamental principles, frameworks, and best practices to catch visual regressions across devices and configurations before they reach production.
000
Alex Zhukovich @alexzh.com · 25/06/2026
4/ One thing to try this week: Add screenshot tests to your core screen. Check two font scales and both color modes (light and dark).
100
Alex Zhukovich @alexzh.com · 25/06/2026
3/ A button that is perfect alone can have a wrong padding or placement. Testing components in isolation cannot catch what only exists between elements.
100
Alex Zhukovich @alexzh.com · 25/06/2026
2/ A component test verifies one building block in isolation. A screen test verifies how those blocks live together: placement, padding, alignment, and how everything looks across phones, foldables, and tablets.
100
Alex Zhukovich @alexzh.com · 25/06/2026
1/ Your component screenshot tests are all green, but your app might still have visual issues. Both component and screen tests share the same goal, improving visual quality, but they serve different purposes: #AndroidDev #ScreenshotTesting #SoftwareQuality
140
Alex Zhukovich @alexzh.com · 23/06/2026
Did you know that buttons in Jetpack Compose have predefined constants for button height and icon size for these button sizes: • Extra small • Medium • Large • Extra large Knowing the button size, you can calculate the recommended font size based on the button height. #AndroidDev #JetpackCompose
140
Alex Zhukovich @alexzh.com · 16/06/2026
Read mode: developer.android.com/develop/ui/...
developer.android.com
FlexBox  |  Jetpack Compose  |  Android Developers
This document provides an introduction to FlexBox in Jetpack Compose, a flexible layout container inspired by CSS.
000
Alex Zhukovich @alexzh.com · 16/06/2026
FlexBox component was added to Jetpack Compose. It's a container that lays out items in one of the following directions: • Row • Column • RowReverse • ColumnReverse You’ll need "foundation-layout:1.12.0-alpha03" to try it out. #AndroidDev #JetpackCompose
130
Alex Zhukovich @alexzh.com · 10/06/2026
A nice surprise this morning: my book Mastering Android Screenshot Testing is being featured on the Leanpub homepage 🎉 Thank you to everyone who grabbed an early copy. More chapters are on the way! The 10% launch discount is still available: leanpub.com/mastering-a...
010
Alex Zhukovich @alexzh.com · 10/06/2026
Read more: developer.android.com/develop/ui/...
developer.android.com
Grid  |  Jetpack Compose  |  Android Developers
Implement adaptive two-dimensional layouts using the Jetpack Compose Grid API.
000
Alex Zhukovich @alexzh.com · 10/06/2026
Grid component was added to Jetpack Compose. It lets you build two-dimensional layouts. You’ll need "foundation-layout:1.12.0-alpha03" to try it out. #AndroidDev #JetpackCompose
120
Alex Zhukovich @alexzh.com · 05/06/2026
Thank you to the technical reviewers: @testableapple, @burcukutluay, Arnold Noronha, and @Gio_Sastre. Questions? Drop them in the comments. Launch offer: 10% off until June 14. leanpub.com/mastering-a...
leanpub.com
Mastering Android Screenshot Testing
This comprehensive guide explores automated screenshot testing in Android development. Learn the fundamental principles, frameworks, and best practices to catch visual regressions across devices and configurations before they reach production.
000
Alex Zhukovich @alexzh.com · 05/06/2026
• Defining scope for screenshot testing • Writing your first tests for components/screens • Handling async images • Generating tests from preview functions
100
Alex Zhukovich @alexzh.com · 05/06/2026
Mastering Android Screenshot Testing is now available. 10 chapters (50% of the full book). Here's what's inside ⬇️ • Why and when to use screenshot testing • Framework comparison: Android Testify, ComposePreview Screenshot Testing, Dropshots, Paparazzi, Roborazzi, Shot
100
Alex Zhukovich @alexzh.com · 19/05/2026
When your environment is stable, you can run at 0% threshold.
000
Alex Zhukovich @alexzh.com · 19/05/2026
Instead of increasing the threshold value, address the inconsistency: • Run tests in identical environments every time (CI/CD pipeline) • Eliminate dynamic data from test cases (use fake data) • Define explicit configuration per test (color mode, font size, locale)
100
Alex Zhukovich @alexzh.com · 19/05/2026
That's enough to hide entire missing UI elements or misaligned layouts your users will absolutely notice. Drop it to 1%? You're still allowing 26,179 pixels to be different.
100
Alex Zhukovich @alexzh.com · 19/05/2026
Here's the problem: Devs change screenshot test thresholds thinking 2% is small and safe. Here's the math for a Pixel 10 (1080 × 2424 = 2,617,920 pixels): a 2% threshold allows 52,358 pixels to be completely different before a test fails.
100
Alex Zhukovich @alexzh.com · 19/05/2026
2% threshold on a Pixel 10? That's 52,358 pixels. Many developers set this number in screenshot tests without understanding what it actually permits.
100
Alex Zhukovich @alexzh.com · 05/03/2026
Early supporters get: • All future updates at a reduced price • Help decide which topics get covered in the remaining chapters If you want to ship quality apps with confidence, join the waitlist: alexzh.com/books/maste...
alexzh.com
Mastering Android Screenshot Testing
This comprehensive guide explores automated visual testing in Android development. Learn the fundamental principles, frameworks, and best practices to catch visual regressions across devices and configurations before they reach production.
000
Alex Zhukovich @alexzh.com · 05/03/2026
The first release covers 10 chapters, which is 50% of the full book. The remaining chapters will be shaped by feedback from Android developers, making the final version more practical and impactful.
100
Alex Zhukovich @alexzh.com · 05/03/2026
Plus hands-on examples of screenshot testing a real app: • Themes • Localization • Adaptive UIs • Font sizes • CI/CD integration • Future trends • AI-assisted screenshot testing
100
Alex Zhukovich @alexzh.com · 05/03/2026
The book dives deep into: • Why screenshot testing matters for mobile apps • In-depth comparison of frameworks: Android Testify, Dropshots, Paparazzi, Roborazzi, Shot, and Compose Preview Screenshot Testing • Practical use of ComposablePreviewScanner and AndroidUiTestingUtils
100
Alex Zhukovich @alexzh.com · 05/03/2026
2.5 years: 1,000+ hours of writing, 2 full drafts, and over 50,000 words, and that's not even counting the code. I'm writing a book on Android screenshot testing, and the first release is coming in April 2026. Here's what it covers ⬇️
100
Alex Zhukovich @alexzh.com · 20/02/2026
Just found out you can now generate widget previews using Jetpack Compose. Override "providePreview" in your widget class. ⚠️ Android 15+ only (Glance 1.2.0-rc01). For older versions, combine with XML (12+) or images as a fallback.
010
Alex Zhukovich @alexzh.com · 18/02/2026
Your date formatter may work locally, but break elsewhere. SimpleDateFormat(...) and DateTimeFormatter.ofLocalizedDate(...) do not guarantee the result your users expect. Use DateFormat.getBestDateTimePattern() for the right locale pattern. #AndroidDev
020
Alex Zhukovich @alexzh.com · 10/02/2026
"Just display the number. What could go wrong?" Localize your app into Arabic and find out. Instead of using raw numbers in your UI, use NumberFormat. Not only digits depend on the locale, but also decimal separators, thousand groupings, and many other formatting conventions.
000
Alex Zhukovich @alexzh.com · 29/01/2026
Full guide: alexzh.com/how-to-fix-...
alexzh.com
How to fix the Compose preview naming problem
If you use PreviewParameterProvider, you've probably struggled with index-based names like "uiState 0" and "uiState 1." Starting with ui-tooling-preview:1.10.0, you can finally add custom display names to your preview states.
000
Alex Zhukovich @alexzh.com · 29/01/2026
Starting with ui-tooling-preview:1.10.0, you can override "getDisplayName()" in your PreviewParameterProvider to replace index-based naming with meaningful labels. It takes less than 5 minutes to set up, but it removes the confusion every time you open the preview panel.
100
Alex Zhukovich @alexzh.com · 29/01/2026
Last week I published a short article about a small but annoying problem with PreviewParameterProvider in Jetpack Compose. If you've ever used PreviewParameterProvider, you know the pain: your previews have names like "uiState 0", "uiState 1", "uiState 2". Here's how to fit ⬇️
110
Alex Zhukovich @alexzh.com · 22/01/2026
If you use PreviewParameterProvider in Jetpack Compose, you know the frustration of seeing index-based preview names, like uiState 1. Good news: ui-tooling-preview:1.10.0 finally lets you add custom names to your preview states. Here's how to use it: alexzh.com/how-to-fix-...
alexzh.com
How to fix the Compose preview naming problem
If you use PreviewParameterProvider, you've probably struggled with index-based names like "uiState 0" and "uiState 1." Starting with ui-tooling-preview:1.10.0, you can finally add custom display names to your preview states.
030
Alex Zhukovich @alexzh.com · 20/01/2026
How many preview functions do you use per component or screen in Jetpack Compose? If it's more than two, consider using PreviewParameterProvider. Less code. Same coverage. #AndroidDev #JetpackCompose
020
Alex Zhukovich @alexzh.com · 08/01/2026
Screenshot testing is no longer optional. Most devs never check out your branch; instead, they read the diff and approve. Now AI writes code faster than humans can review. As a result, more and more UI bugs go to production. Catch them before your users do. #AndroidDev
020
Alex Zhukovich @alexzh.com · 05/12/2025
Recommended website to download Material Icons: fonts.google.com/icons Link to official update: developer.android.com/jetpack/and...
developer.android.com
Compose Material 3  |  Jetpack  |  Android Developers
000
Alex Zhukovich @alexzh.com · 05/12/2025
Do you use the "material-icons" library for Jetpack Compose? Important news: Google team will no longer publish updates for this library, as it's not the recommended way for displaying Material Icons in Compose. Recommended way: Downloading a Vector Drawable XML from the official website (link ⬇️).
100
Alex Zhukovich @alexzh.com · 02/12/2025
Compose Preview Screenshot Testing forces moving your previews into the "screenshotTest" source set, which leads to code duplication or losing your previews. Instead, reuse your preview functions in the screenshotTest source set. Previews + screenshot tests. No duplication. #AndroidDev
010
Alex Zhukovich @alexzh.com · 27/11/2025
Want to dive deeper into each test type? I wrote a detailed breakdown of UI testing types with practical examples: alexzh.com/not-all-ui-...
alexzh.com
Not all UI tests are the same
The article explores different types of UI testing, such as end-to-end testing, UI testing with fake data, pixel perfection testing, and accessibility testing. The article also includes information on how to get started with UI testing in any project.
000
Alex Zhukovich @alexzh.com · 27/11/2025
When you match the right type of tests to the right job, your E2E suite shrinks dramatically—and execution time stops being a problem. Stop asking "how do we make E2E faster?" Start asking "should this even be an E2E test?" What percentage of your UI tests are currently E2E?
100
Alex Zhukovich @alexzh.com · 27/11/2025
The only way to make your UI tests fast and reliable is to replace most of your E2E tests with different test types: • E2E tests → Verify production environment integrations • UI tests with fake data → Verify state handling (loading, success, error) • Screenshot tests → Verify the pixel perfectness
100
Alex Zhukovich @alexzh.com · 27/11/2025
Most teams believe end-to-end tests are the only UI testing strategy available. So they focus on improving infrastructure or switching to a "better" framework. But E2E tests were never designed to test everything. They verify one thing: how your app talks to the production environment.
100
Alex Zhukovich @alexzh.com · 27/11/2025
"How do we make our E2E tests fast and stable?" I've answered this question after every UI testing talk I've ever given, and my response always surprises people.
100
Alex Zhukovich @alexzh.com · 20/11/2025
But, there's a crucial point: your tests might pass even if your UI is broken. That's why I'm writing a book on Visual Testing for Android. Join the waitlist to find out when it launches and to access early bird pricing: alexzh.com/android-vis...
alexzh.com
Visual Testing for Android
This comprehensive guide explores automated visual testing in Android development. Learn the fundamental principles, frameworks, and best practices to catch visual regressions across devices and configurations before they reach production.
000
Alex Zhukovich @alexzh.com · 20/11/2025
Thank you to everyone who attended my talk at @droidcon.it about tools and frameworks for E2E and UI tests with fake data, including: • Android Journey • Maestro • Espresso • Compose UI Test • Kaspresso Slides from my talk: speakerdeck.com/alexzhukovi... #DroidconIt #AndroidDev
speakerdeck.com
The Complete Android UI Testing Landscape: From Journey to Traditional Approaches
Don't know where to start with Android UI testing? The new AI-powered Journey tests offer a low-code entry point that gets you testing immediately. I…
130
Alex Zhukovich @alexzh.com · 30/10/2025
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?
010
Alex Zhukovich @alexzh.com · 30/10/2025
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.
100