I bought a new laptop, such fast, much happy.

I’ve recently been in the market for a new laptop for myself. My priorities were:

  • Small enough to be able to sit on the sofa and do my life-admin tasks.
  • Powerful enough to do a bit of development without waiting for the earth to do a complete rotation.

The laptop which I was using for these tasks was a Pixelbook i7 16GB. To be honest, I love this laptop for general web-browsing tasks. It’s small, it’s portable, and the 3:2 screen ratio really works for reading/writing. BUT…. it’s slow.


How the build speed, APK size and source line count changed after migrating the Tivi sample app to Jetpack Compose

This post has been updated since it was first published, to new include updated stats for Jetpack Compose 1.0.0–beta05. If you would like to see the original version of this post, see here.

In 2020, I began the task of slowly migrating the UI in Tivi to be written in Jetpack Compose, and roughly 12 months later it is now complete. 🎉

In this blog post, we’ll take a look back and compare a number of key metrics to see how well Compose compares in: APK size, build speed and lines of code.

The app

Before I go any further into the…


Using Material Design Components to implement a dark theme

In the previous blog posts, Nick Rout went through the basis of Material Theming, and the pillars of color, typography and shape.

This post is going to build upon that to see how we can adapt our apps to support dark themes.

User selectable dark themes were added to the Android platform in Android 10, but that does not mean they’re new to app developers. The default theme for Android devices was dark up until Android 5.0 (Lollipop)!

The difference last year was that the platform added a device-wide setting. …


Illustration by Kiran Puri

Creating seamless keyboard animations using WindowInsetAnimation

In the previous blog post, we covered all of the changes to the APIs related to going edge-to-edge:

In this blog post we move forward on with the actual task of animating the keyboard. To demonstrate what is possible, here you can see an example of the same app, running on Android 10 on the left, and Android 11 on the right (at 20% speed):


Illustration by Kiran Puri

New WindowInsets APIs for checking the keyboard (IME) visibility and size

New in Android 11 is the ability for apps to create seamless transitions between the on screen keyboard being opened and closed, and it’s all powered by lots of improvements to the WindowInsets APIs in Android 11.

Here you are two examples of it in action on Android 11. It has been integrated into the Google Search app, as well as the Messages app:


Illustration by Virginia Poltrack

A worked example from the Tivi app

This blog post is the second of two which explores how coroutines enables you to write complex asynchronous UI operations in a much simpler way. The first post goes through the theory, while this post demonstrates how they fix a problem.

If you want to recap the first post, you can find it here:

Let’s take what we learnt in the previous post and apply it to a real-world app use case.

The problem

Here we have the TV show details UI from the Tivi sample app. As well as information about the show, it lists the show’s seasons and episodes. …


Illustration by Virginia Poltrack

How coroutines can make UI programming easier

Kotlin Coroutines allow us to model asynchronous problems like synchronous code. That’s great, but most usage seems to concentrate on I/O tasks and concurrent operations. Coroutines are great at modelling problems which work across threads, but can also model asynchronous problems on the same thread.

There’s one place which I think really benefits from this, and that’s working with the Android view system.

Android views 💘 callbacks

The Android view system loves callbacks; like really loves callbacks. …


Cover image by Virginia Poltrack

This is the third post in our series on Gesture Navigation. If you want to skip to another post, you can find them listed below:

The previous post marks the end of us talking about drawing to the edges. In this third post we’re going to cover how to handle any gesture conflicts, between your app and the new system gestures in Android 10.

What do we mean by gesture conflicts? Let’s take a look at an example. Here we have a music player app, which allows the user to scrub through the current song by dragging a SeekBar.


Cover image by Virginia Poltrack

This is the second post in our series on Gesture Navigation. If you want to skip to another post, you can find them listed below:

In part 1 of this series, we explored how you can make your app go ‘edge-to-edge’. Unfortunately this can result in some of your views being drawn behind the system bars, obscuring them from the user. This post explores how we can inset those views, moving them away from the system bars.

For the rest of this post I’ll be referring to something called the ‘system UI’. This is what we call any of the…

Chris Banes

Work @Google on #Android

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store