Chapter 9: Exploring Interoperability APIs
The aim of this book is to show you how to develop beautiful, fast, and maintainable Jetpack Compose apps. The previous chapters helped you get familiar with core techniques and principles, as well as important interfaces, classes, packages, and—of course—composable functions. The remaining chapters cover topics beyond a successful adoption of Android's new declarative user interface toolkit.
In this chapter, we are going to look at AndroidView()
, AndroidViewBinding()
, and ComposeView
as the interoperability application programming interfaces (APIs) of Jetpack Compose. The main sections are listed here:
- Showing Views in a Compose app
- Sharing data between Views and composable functions
- Embedding composables in View hierarchies
We start by looking at how to show a traditional View hierarchy in a Compose app. Imagine you have written a custom component (which under the hood consists of several UI elements...