头图

Jetpack Compose 1.0 is officially released! Android modern toolkit for creating native UI

Android开发者
中文

Author/ Anna-Chiara Bellini, Product Manager, Nick Butcher, Developer Relations

Today, we officially released Jetpack Compose , which is a modern native UI toolkit for Android that can help you build better applications faster. This is a stable version of Compose, available for everyone to use in production. In the past two years, we have been working hard to develop Compose and have received positive feedback and participation from the Android community. When we released 1.0, more than 2,000 apps in the Play Store are already using Compose. In fact, the Play Store app itself is also using Compose! But that's not all. We have been working with some top app developers, and their feedback and support have helped us make the 1.0 version more powerful. For example, Square tells us that by using Compose, they can "focus on the things unique to Square and the UI infrastructure instead of solving the broad problem of building a declarative UI framework." Monzo said that Compose allows them to "build a higher quality interface faster." Twitter made a very good summary : "We like it! ❤️". Click here view the official release video of Jetpack Compose 1.0 for more information.

We designed Compose to allow you to build native Android applications faster and easier. With a completely declarative approach, you only need to describe your user interface, and Compose takes care of the rest. As the state of the application changes, your UI will automatically update, which makes it easier to quickly build the UI. The intuitive Kotlin API can help you build beautiful applications with less code. Compose has native access to existing Android code, which means you can adopt it at your own pace. The powerful layout API and code-driven UI make it easier to adapt to devices of different specifications, such as tablets and foldable devices. Compose will also support more usage scenarios such as WearOS and Homescreen Widgets!

Version 1.0 can be used in production. The core functions you need are all in it, including:

  • interoperability : Compose and existing applications can be interoperability . You can embed Compose UI in View and vice versa. You can just add a button on the screen, and you can also keep the custom view you created in the interface created by Compose.
  • Jetpack integration : Compose and the well-known and loved Jetpack development library natural integration. Through integration with Navigation, Paging, LiveData (or Flow/RxJava), ViewModel and Hilt, Compose can perfectly coexist with your existing architecture.
  • Material : Compose provides Material Design components and theme , allowing you to easily build beautiful applications that match your brand personality. The Material theme system is easier to understand and track, and there is no need to scroll through multiple XML files.
  • list : The Lazy component of Compose provides a simple, concise and powerful way for the presentation list
  • animation : Compose's concise animation API makes it easier for you to create an experience that will make users' eyes shine.

New tool

Jetpack Compose's fully declarative approach has fundamentally changed the way user interfaces are developed. In order to support new workflows and different ways of thinking, we are providing new tools, specifically designed for Compose, and adding support for Compose to some existing tools.

Compose Preview

newly added Compose Preview in Android Studio Arctic Fox allows you to view different states, light and dark themes, or Composables of different font sizes at the same time, making it easier to develop components without having to deploy the entire application to The device is in. Through real-time editing of words, you can see the updates in real time without recompiling the project.

Deploy Preview

If you ever wanted to be able to test a part of the UI directly on the device without navigating step by step to the interface you are adjusting, then you will love the new Deploy Preview: just create a preview for your Composable, It can be deployed directly to the device for rapid iteration.

Layout Inspector supports Compose

Layout Inspector adds support for Composables, allowing you to safely mix Compose and existing Views.

Compose releases roadmap

Adopting any new framework needs to be evaluated, especially something as far-reaching as the new UI toolkit. In order to help you make an informed decision and determine whether it is the right time to adopt Compose, we have given a public roadmap , and share with you our follow-up construction plan for Jetpack Compose:

Learn Compose

To help you and your team master Compose, we have prepared a large number of learning resources:

The sea of learning is endless! At this time, you might as well try Jetpack Compose Pathway , this is a step-by-step study guide, through the key codelab, video and documentation to help you understand everything about Compose.

I wish Compose a happy development!

We firmly believe that Jetpack Compose is a huge leap, allowing us to create excellent UI faster and easier; we look forward to seeing the results that everyone uses Compose to create. Now that the stable version of Compose 1.0 has arrived, it is time to start using it. There is nothing like writing code yourself! I wish you all a happy creation!

Your product feedback and questions are very important to us, welcome to submit feedback to us through the QR code below. Your question may appear in the next FAQ and be answered. thank you for your support!

阅读 713

Android 开发者
Android 最新开发技术更新,包括 Kotlin、Android Studio、Jetpack 和 Android 最新系统技术特性分享。

Android 最新开发技术更新,包括 Kotlin、Android Studio、Jetpack 和 Android 最新系统技术特性分享。...

261 声望
1.4k 粉丝
0 条评论
你知道吗?

Android 最新开发技术更新,包括 Kotlin、Android Studio、Jetpack 和 Android 最新系统技术特性分享。...

261 声望
1.4k 粉丝
宣传栏