Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Devfest GDG Hanoi 2020 - Jetpack Compose - A de...

Toan Tran
October 31, 2020

Devfest GDG Hanoi 2020 - Jetpack Compose - A declarative UI Approach

This talk walks through the idea of Jetpack compose with its key concepts to help build the UI of Android in a declarative way. It also helps link with other similar toolkits available in the market and provided additional resources to get started with JP compose.

Toan Tran

October 31, 2020
Tweet

More Decks by Toan Tran

Other Decks in Programming

Transcript

  1. “Tell me what you want (And I’ll give you what

    you need)” A Song from The Doobie brothers - 1974
  2. • Toan Tran • Vice President, Mobile @Lazada • Occasional

    speaker at local events • Google Developer Expert in Kotlin • Father, farmer, shipper • Find me on social media: [email protected] About me
  3. 1. Declarative vs Imperative 2. What is Jetpack compose? 3.

    How Jetpack Compose can help? 4. What's fun about it? 5. What's for me? (key takeaways) Agenda
  4. 1. Just a function 2. Take inputs and decides how

    UIs are showed. 3. Convert data state into view state 4. Can call other composable functions or being called in other composable functions. 1. Composable function
  5. 1. Built-in components • Box • Canvas • Image •

    LazyColumnFor • LazyRowFor • ScrollableRow • ScrollableColumn • Shape • Text Foundation
  6. 1. Built-in components • AlertDialog • Button • Card •

    Checkbox • FloatingActionButton • ModalDrawerLayout • RadioGroup • Scaffold • Slider • ... Material
  7. 1. No more findViewById 2. Layout code is code (clean?

    reusable? maintainable? testable?) 3. Kotlin first || Kotlin idiomatic 4. Enable data oriented architecture Problems solved