hrach.dev

This is a post in a series on how I tackled Nav3 concepts and wired things together. Dialogs are modeled as an overlay scene; the destination behind the screen must remain rendered. Right now, its lifecycle stays resumed. That creates a number of practical challenges and problems: The last issue caught me off guard. dropUnlessResumed … Read more

This is a post in a series on how I tackled Nav3 concepts and wired things together. I needed a sheet that can be closed by dragging it down – it surprised me a bit that the implementation isn’t that difficult. It uses the overlay scene concept and a few basic helpers from the Compose … Read more

This is a post in a series on how I tackled Nav3 concepts and wired things together. Edit: with 1.1.0-rc01 the impl in this blog post stopped working, or put another way, it wasn’t correctly observing the Lifecycle changes. Fixed now. There is no Nav3 bottom sheet implementation yet, so this is a quick post … Read more

We’re all happy about Navigation 3, right? But before we get more stability and recipes, I had to fix something in Navigation 2′ use case. This post is about a hack to get things working. If you know a better way, definitely reach out to me. The Problem I’m working on an app that will … Read more

Having a paginated stream of data can give you a bit of a headache. AndroidX provides its own paging library, which offers a lot of abstraction. However, I ultimately failed three times and started looking into what other options I had. My Issues with AndroidX.Paging All these issues ultimately stem from AndroidX.Paging’s very closed, strict … Read more

Many months have passed since I last wrote about Kotlin Flow: Domain Model’s StateFlow Sharing. So, let’s take a look at something related to Flow handling in a ViewModel. StateIn shortcut Usually, you want a StateFlow‘s state to survive a configuration change. AndroidX’s default time limit is 5 seconds — but only if it’s subscribed. … Read more

You may have heard that Jetpack Navigation has a new API for type-safe navigation. This new official solution brings navigation with a “destination object” instead of simple manual URL building. Previously, I developed kiwicom/navigation-compose-typed library that did the same and was an inspiration for the official solution. The official solution makes navigation easier than before, … Read more

This blog post is a repost from code.kiwi.com. Newly, there is a meetup talk about Navigation Compose Typed library. Jetpack Navigation Compose is the Jetpack Navigation library enhanced for usage in Compose. But the actual “enhancement” is a bit limited and different from the View-based navigation. Most importantly, there are no SafeArgs — a type-safe … Read more

Android end-to-end UI testing is not that difficult, but we have observed that the official API/tooling doesn’t scale much if you have a big app. “Page Object” is a design pattern abstraction over a particular screen: it provides access to read the screen’s data and provides an API to interact with the screen. You may … Read more

Our Kiwi.com app is quite old and vast. It is in development for about 7 years; each year we’re adding more features and code, each year the app is being worked on by more developers. We evolved to a custom back-aware logic in our activities and fragments. Basically, back press was handled in the activity … Read more