TheAndroidShow JetpackComposeBlog 02192028229
TheAndroidShow JetpackComposeBlog 02192028229


Written by
Anna-Chiara Bellini, Product manager, Nick Butcher, Developer relationships

The Android Show: Jetpack Compose, Feb. 24 at 9 a.m. PT

Today we are launching the beta version of Jetpack Compose, our new UI toolkit, which makes it faster and easier to create native apps on all Android platforms. Compose offers modern, declarative Kotlin APIs that allow you to build beautiful, responsive apps with much less code. Designed to integrate with existing Android apps and Jetpack libraries, you can take over Compose at your own pace by combining Android Views and Compose.

With this beta version, Compose is API-complete and has all the functionality you need to build production-ready apps. Beta also means API stable, so we won’t change or remove APIs. Now is a good time to learn about Compose and plan how you will use it in an upcoming project or feature once it hits 1.0 later this year.

What’s in beta?

Our team developed Compose outdoors with feedback and participation from the community. Since the open sourcing development in 2019, we have published 30 publications, fixed over 700 external bugs, and accepted over 200 external contributions. We love to see what you’ve created with Compose and have used your feedback and feature requests to refine our APIs and prioritize our work. Since the alpha version we have added and improved a number of new features:

  • 🆕 Coroutines support
  • 🆕 Accessibility support for Talkback – support for other technologies is provided in stable
  • 🆕 Easy to use animations with a completely new API since Alpha.
  • Interoperability with views
  • Material UI components, all with @Sampled code
  • Lazy Lists – Jetpack Compose takes over RecyclerView
  • DSL-based constraint layout
  • Modifiers
  • Testing
  • Theming and graphics with simple support for dark and light modes
  • Typing and gestures
  • Text and editable text
  • Window management

In the beta version, we focused on ensuring the completeness of the API. that there are all of the basic APIs that we can continue to build on for 1.0 and beyond. We will work to stabilize these APIs up to our version 1.0, with a particular focus on the performance and accessibility of the apps.

Compose Beta is powered by the latest Canary from Android Studio Arctic Fox, which includes many new tools:

    🆕 Live literals: Real-time updating of literals in the preview and on the device or emulator

    🆕 Animation Preview: Review and play animations

    🆕 Write the support in the layout inspector

    🆕 Interactive Preview: Inspect and interact with a composable in isolation

    🆕 Deployment Preview: To deploy a composable to your device without the need for a full app

Live literals on Android emulator

Layout Inspector for Jetpack Compose

Works with your existing app

Jetpack Compose is designed to work seamlessly with Android Views and you can take over at your own pace. You can embed Compose user interfaces in Android views and use views in Compose. We define a number of adoption strategies in our interoperability documentation.

In addition to View Interop, we incorporate general libraries to make it easy for you to add Compose to your existing applications. There’s no need to rewrite or rebuild your app. We offer integrations with:

  • navigation
  • ViewModel
  • LiveData / Rx / Flow
  • Paging
  • Handle

The MDC-Android Compose Theme Adapter and Accompanist libraries provide integrations with Material and AppCompat XML themes so that you do not have to duplicate theme definitions. Accompanist also offers wrappers for popular image loading libraries.

Think in composing

Jetpack Compose is a declarative UI toolkit, a paradigm shift from the current view system in which you describe What Your user interface should look for a specific application state, not How to produce it. Compose takes care of updating your UI when your app state changes, so you don’t have to bring your UI to the state you want, which can be tedious and error-prone.

Compose was developed entirely in Kotlin and uses its great language capabilities to offer powerful, concise and intuitive APIs. For example, with coroutines we can write much simpler asynchronous APIs such as: B. Describe gestures, animations or scrolling. This makes it easier to write code that combines asynchronous events, such as: B. a gesture that is passed on to an animation, where cancellation and cleanup are carried out through structured parallelism.

Learn to compose

We have updated our learning path so that you and your team can learn everything about Jetpack Compose. A curated list of videos, handy codelabs, and important documents to get you started. Today we’re releasing new and updated documentation guides, a series of screencasts, and a new animation codelab to delve deeper into creating with Compose. From guides on architecture, accessibility and tests to in-depth influences in animations, lists or thinking in Compose, we have guides to help you stay up to date.

We also offer 8 official sample applications if you want to jump right in and see Compose in action. We have simple to complex examples, each showing different APIs and use cases. Please refer to the readme file for more information.

#AndroidDevChallenge: Learn to compose and win prizes

When you’re ready to get started with Compose and want to win some prizes along the way too, check out the #AndroidDevChallenge. Weekly challenges will be offered over the next four weeks to give you your own insights into Jetpack Compose so you can work through your projects. Compete to win new prizes for each challenge. Over a thousand prizes are up for grabs, including the Google Pixel 5. For more information on the first Weekly Challenge, starting today, click here.

When Jetpack Compose hits beta – with stable APIs and full functionality for 1.0 – it’s a good time to learn Jetpack Compose and plan how you might use it in an upcoming project. We’d love to hear your feedback on the introduction of Compose in your app or take part in the discussion on the Kotlin Slack # compose channel.



LEAVE A REPLY

Please enter your comment!
Please enter your name here