Compose is a declarative UI toolkit that is about to kick-off for Android. It's the future of Android UI, providing declarative APIs to create layouts of any complexity, manage and observe state changes automatically. Its API surface leverages immutable view state and its compiler is oriented to unlock efficient UI rendering and updates. Compose requires Kotlin and removes the duality of code and XML we had prior to what is imposed by the Android layout system
In this course, you will learn the guts of Compose, its purpose, and how it can be used for your day-to-day Android apps.
- Previous experience with Kotlin and Android knowledge.
- Familiarity with other declarative UI frameworks like React, Flutter or similar would be helpful, but not required.
- A computer with Android SDK and Android Studio or IntellIJ.
What you'll learn
- The purpose of Compose.
- The benefits of declarative UI frameworks.
- Removing XML / code duality..
- Blending the use of library composables with writing your custom ones.
- The ability to use logics and control flow to compose UI.
- How declarative UI frameworks fit into Android architecture
- The libraries within compose
- How to write our first Composable function.
- The compose DSL
- How to integrate a composable tree with the standard Android view system.
- How to preview our composable.
- Multiple layout previews (phone sizes, tablets).
- State management. Reading and updating state.
- Binding immutable state to our composables.
- Reading state from our composable.
- How to write a complex UI as a composable tree.
- Providers and ambients.
- Transitions and animations in compose.
- Working with texts.
- Managing user input.
- Modeling and handling state and state updates.
- Architecture around compose.
- Compose compiler: code generation for the runtime. Understanding how the UI is built and updated.
- Runtime: rendering optimizations / skip rendering when required.
- Writing tests for our composable tree.
- Similarities / key differences between Jetpack Compose and Functional Programming (composable functions as side effects).
- Compose compiler working over the new compiler IR.