Using Compose Beta on AS 4.1

Jetpack Compose hit Beta! Many teams are excited to experiment with Compose, but as you might know, since 1.0.0-alpha04, the compiler has been refactored to a new group and became incompatible with the current Android Studio (AS) 4.1 stable: Compose Version 1.0.0-alpha04 is only compatible with Android Studio 4.2 Canary 13 and later. Been forced to use a Canary version of AS is a real bummer. There are cases in which you want to explore Compose in a real-world application (e....

March 30, 2021

N26 Path to Anvil

This post represents my personal experience while working at N26. I do not speak for the company nor by other employees. N26 Android App current codebase has a million lines of code, 280+ modules, and 30+ engineers working in 4 different countries and different timezones in a mono repository. Our modules are divided into features and libraries, and we have been using “Sample Apps” for years now as our full app build time might take up to 20 minutes....

February 5, 2021

Humble Views, Proud ViewModels

The Android Community has long advocated that Activities and Fragments were views - but this perception has changed over time. For good. Let’s dive deep into how to design views and view models, how they wire to a LifecycleOwner, and how this can positively impact your’s app testability. To better describe how to build humble views we will be developing an elementary Sign-Up form with an email, a password text field and two buttons: a cancel that pops the user’s back stack and a sign up that creates an account and moves the user to the home screen....

February 1, 2021

Naming Factory Methods

When talking about Factory Methods, extension functions tend to be favored in Kotlin - but it might be a challenge to name these functions in a discoverable way without polluting your project’s namespace. A good source of inspiration is Kotlin’s Standard library: it contains many examples we can use as a base when deciding how to design a function. Wrapping an instance If you intend to get a given instance and adapt to one different object to follow another contract, for example, creating a ViewModelProvider....

February 1, 2020