Jetpack Compose is a separate toolkit designed to simplify UI development. It connects the model of reactive programming with finiteness and ease of use of the Kotlin programming language.
NOTE: Jetpack Compose is currently in its early research stage, pre-alpha. Its API is not yet complete and therefore should not be used in production.
from the translator: at the bottom of the article link to a video with a report on the Jetpack Compose at the conference "Google I / O'19"
Basic principles
Kotlin brevity and style
takes advantage of Kotlin - short, secure, and fully compatible with Java. Designed to significantly reduce the amount of standard code, which allows you to focus on your code, and helps to avoid internal class errors
Declarative
Fully declarative definition of UI components, including drawing and creating your own placements. Simply describes your UI as a set of composable functions, and the platform manages the optimization of the UI and automatically updates the widget hierarchy.
Compatible
compatible with existing widgets so that you can mix and combine, as well as adapt as you need with direct access to all Android and Jetpack APIs
Allows you to create beautiful applications
supports material design out of the box, as well as animation, so it makes it easy to create beautiful applications filled with movement
Accelerates development
Accelerate development by writing less code and using tools like Apply Changes and viewing changes in real time.
Compose UI library, which contains the main UI toolkit, i.e. markup, input fields, text fields, animations, styles, widgets and graphics
Compose compiler, own Kotlin-compiled plugin containing layout functions and automatically updating the UI hierarchy
A compose application consists of composable functions that transform application data into a UI hierarchy. Functions are all you need to create a new UI component.
to create a composable function, simply add the @Composable annotation to the function name. Under the hood, Compose uses its own Kotlin-compiled plugin so that when the background data changes, composable functions can be called again to generate updates to the UI hierarchy. A simple example below prints a line on the screen: