Since the start of this year, I’ve been slowly migrating the UI in Tivi to be written in Jetpack Compose, and this week, the first stage of that migration 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: APK size, build speed and lines of code.
Before I go any further into the Compose side of things, let me quickly describe the app.
Tivi is pretty heavily modularized, with each UI ‘screen’ in its own Gradle module (named ui-$NAME
). Each of those screens was implemented in a Fragment
, and then pieced together using AndroidX Navigation in the main app
module. …
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. …
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):
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:
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.
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. …
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.
The Android view system loves callbacks; like really loves callbacks. …
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
.
This is the fourth post in our series on Gesture Navigation. If you want to skip to another post, you can find them listed below:
In this fourth post, we’re going to cover what you can do if your app needs to draw across the entire screen, with the system bars hidden. Referring back to our flowchart from the previous post, we’re going to cover the remaining two solutions on the right hand-side of the chart.
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 system provided UI on screen, such as the navigation bar and status bar. …
This is the first post in our series on Gesture Navigation. If you want to skip ahead to another post, you can find them listed below:
You could catch our talk from Android Dev Summit 2019:
With Android Q, a new system navigation mode has been added, allowing the user to navigate back, navigate to the home screen, and trigger the device assistant via gestures.
About