Build an app, but make it pretty – Android devs get new UI toolset

User Interface

The team behind Android app building library suite Jetpack has used Android Dev Summit to introduce developers to a preview of Jetpack Compose, a toolkit for creating nicer Android UIs. 

Jetpack Compose is promoted as a “targeted answer to problems people have been having” when building Android apps. In a short video explaining the project, Google group product manager Karen Ng says that, while Jetpack was brought up to make high quality app development easier, “UI was never really solved well”.

The Compose release is supposed to change that by offering tools and Kotlin APIs to facilitate developing nicer interfaces. The project is based on composable functions, that allow a programmatic definition of an app’s UI. Instead of focussing on the construction of how the interface is constructed, users are meant to describe shapes and dependencies.

Hierarchies are created by calling composable functions from other composable functions, while content seems to be mainly structured in columns and containers. Compose also promises live previews for easy iterations and to generally let users “do more with less code”, leading to fewer bugs in the process.

Advertisement

Since Android is mostly developed by Google, it doesn’t come as a surprise that Compose has been built in a way that helps to enforce material design principles. The design system has been around since 2014 as a guide to building “beautiful products” and is used for most of the company’s Android applications.

To make sure no dev will be left behind when wanting to dip their toes into the Compose waters, backward compatibility apparently was key when setting the tool up. At least that’s what Ng suggests: “It was important to make sure that when people adopt Compose, you can adopt just a part and it’s compatible with your existing views.”

Devs interested in testing Compose can do so via the also newly released first Canary build of Android Studio 4.0. They should be aware, however, that Compose is still in its development phase, which means that “the API surface is not yet finalized, and changes are planned and expected”.

It might be a while till the project is production ready. Director of product management Stephanie Cuthbertson writes in her modern Android development roundup that the team plans to “bring Jetpack Compose to beta next year”, which could span a whole lot of time.

Keeping expectations in check might not be the worst idea anyway, since software engineer Adam Powell ended the intro video proclaiming “the best parts of Compose won’t come from us and that’s really the most exciting thing about it”. Well…get to work then?

- Advertisement -