2. Disclaimer
• I’m not an expert on any of this :)
• This is the result of building the sample, exploring source
code and some reading
• Flutter and React devs - feel free to speak up
• Compose is pre-alpha and not ready for production
3. What is it?
• A “…modern, reactive style UI toolkit for Android, which takes advantage
of Kotlin and integrates seamlessly with the platform and all of your
existing code.”
• Declarative - “Simply describe your UI as a set of composable functions,
and the framework handles UI optimizations under the hood and
automatic updates to the view hierarchy.”
• Inspired by/similar to Flutter, React, Litho
• Way to allow the Android UI Framework to evolve, unbundled from
platform releases
• Create smaller, reusable UI components by composing lower-level UI
components, e.g.:
17. Q: Are components just implemented
with Fragments/Views?
• No*, widgets are just functions that ultimately make
canvas draw calls.
• *In practise, you need at least one special View:
AndroidCraneView
• Typically you won’t create this directly, but via
CraneWrapper, e.g.:
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContent {
CraneWrapper {
RallyApp()
}
}
}
18. Q: How do I check it out?
• Short answer - follow this guide: https://medium.com/
q42-engineering/try-jetpack-compose-today-
a12bda50aed2
19. Q: How do I check it out?
Longer answer:
• Get a Repo client (Google’s VCS)
• Check out the androidx branch of AOSP (~3GB)
• Run a script to DL/build a custom unstable version of
Android Studio (30min+)
• Play with the sample projects
20. Further Reading/Watching
• Diving into Jetpack Compose - Thijs Suijten
https://medium.com/q42-engineering/android-jetpack-
compose-895b7fd04bf4
• Android Jetpack Compose Review - Karumi. Mentions some
areas for improvement
https://blog.karumi.com/android-jetpack-compose-review/
• Android developers page
https://developer.android.com/jetpack/compose
• Declarative UI Patterns (Google I/O’19)
https://youtu.be/VsStyq4Lzxo