Google Jetpack Compose UI Toolkit Now In Beta
Written by Nikos Vaggalis   
Monday, 01 March 2021

Google has launched a beta version of Jetpack Compose, a new UI toolkit that is designed to make it faster and easier to build native Android apps. The developers say that Compose offers modern, declarative Kotlin APIs, that can be used to build "beautiful, responsive apps with way less code".

Jetpack Compose was originally deployed as part of Google's Architecture Components, an attempt to clean up and freshen up the ways of developing for Android. Subsequently it has established itself as the new and default way of building GUI apps on the platform.This clean-up attempt didn't come without churn though, as we've described in Android Jetpack Compose Is Welcome, But What About The Churn?

Back in September 2020 I had covered the newly introduced UI toolkit in its Alpha version.It promised a lot.Backward compatibility with the "old" view-based UI code bases,write dramatically less UI code in declarative fashion and make migrating easy.

The Alpha version included:

  • Animations
  • Constraint Layout
  • Initial A11Y support
  • Input and Gestures
  • Interoperability with Views (start mixing Composable functions in your existing app)
  • Lazy Lists
  • Material UI components
  • Performance optimizations
  • Testing
  • Text and editable Text
  • Theming and Graphics
  • Window management

The now beta, improved on those features but it added new ones as well:

  • Coroutines support
  • Accessibility support for Talkback
  • Easy to use Animations, with a completely new API since alpha.
  • DSL-based Constraint Layout
  • Modifiers
  • Theming and Graphics, with easy support for Dark and Light mode
  • Input and gestures

The Beta version is considered so stable that you can write production ready apps with it.Also Google tells that from now on there won't be APIs removals but only adding new ones and improving the existing.In other words this is an open invitation to start developing with the new platform.For that it is also requires the latest Canary release of Android Studio Arctic Fox which includes new project templates to help you get started with Compose.

From the official announcement I take one thing:

Compose takes care of updating your UI when your app state changes, so you don’t have to manipulate your UI into the desired state which can be tedious and error prone.

Pretty important departure from the world of fragments and memory leaks.

Another departure from the past is that Compose is Kotlin-only.This on one hand allows it to use all of Kotlin's state-of-the-art features such as Coroutines. On the other, it means that you have to go Kotlin from now on, Java won't make the cut any longer.

Also last November and December, I checked out the sibling Jetpack Compose Desktop project by Jetbrains, which is based on Google's Compose, aiming to allow extensive UI code sharing between Android and desktop applications - for example large portions of UI code written for Android can be used, say, on Windows, without hassle. This code sharing happens via the Kotlin Multiplatform SDK.

So there's a couple of components at play that combine to make up Google's vision of the future for the Android platform, and beyond. Kotlin the language, Kotlin Multiplatform, Jetpack, Compose and Compose Desktop.

Of course, without strong documentation everything would be futile. Google is aware of this fact, thus together with the official announcement of the beta release it has also revamped all the relevant documentation and learning pathways, with videos, hands-on codelabs and guides.

Pretty exciting.Now let's get on with it!

More Information

Announcing Jetpack Compose Beta!

Related Articles

Jetpack Compose for Desktop Milestone 2

Introducing Jetpack Compose for Desktop

Android Jetpack Compose Is Welcome, But What About The Churn?

 

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.

Banner


JetBrains Releases Projector For Swing
06/04/2021

JetBrains has released the initial version of Projector, an open source tool and framework for running JetBrains IDEs and Swing apps remotely over your network.



Top 10 Projects From Arduino Community Day
09/04/2021

If you want inspiration for what you can do with an Arduino, take a look at the ten projects chosen as the winners of the Arduino Day Challenge.


More News

square

 



 

Comments




or email your comment to: comments@i-programmer.info