Google has released a beta version of Jetpack Compose. The tool helps developers to build apps for Android faster. Setting up a user interface is now also easier, as there is no need to use XML.
Until now, Android app developers had to use XML to build the user interface. This has always been a time-consuming task, SiliconANGLE writes. Writing the underlying code, meanwhile, was done in a different programming language. With Jetpack Compose, both developing the app and setting up the user interface are done in one simplified API, which Google has named Kotlin.
Google has announced the beta version of Jetpack Compose in a blog post. The company says that Compose is “API complete”, which means that Compose’s API will not be modified anymore. The company emphasises that now is the time to learn the ins and outs of Compose to see how you can use it in a future project when version 1.0 comes out.
Declarative UI toolkit
According to Google, developers should think of Jetpack Compose as a “declarative UI toolkit”. This means that developers should not extensively develop every state of the app with XML but rather describe it. Google likes to use the example of a shopping basket in an app from a webshop. When a user takes something out of the shopping basket, the app has to do a refresh, and some elements look different. With Jetpack Compose, significantly less code would be needed to make that change.
Beta version now available
In the beta version, Google has put a lot of emphasis on making Compose work with existing Android apps. The company has set up multiple integrations with common libraries to help developers migrate their apps into the Jetpack Compose framework.
Version 1.0 of Jetpack Compose is scheduled for release later this year, although an exact date for this release has not yet been announced. The focus of the tool’s development is now mainly on stabilising and fixing bugs.