$30 off During Our Annual Pro Sale. View Details »

The New Era of Android Development - IDCamp x Kadin 2023

The New Era of Android Development - IDCamp x Kadin 2023

Presented for Offline Training Android Dev @Medan

Ahmad Arif Faizin

May 28, 2023
Tweet

More Decks by Ahmad Arif Faizin

Other Decks in Programming

Transcript

  1. The New Era of
    Android Development
    Ahmad Arif Faizin
    Curriculum Developer

    View Slide

  2. View Slide

  3. View Slide

  4. Android
    Studio

    View Slide

  5. Android Studio Bot 🤖

    View Slide

  6. Device Mirroring 🪞
    ● File > Settings > Tools > Device
    Mirroring
    ● Enable mirroring of physical Android
    devices.
    ● Bye bye Visor~

    View Slide

  7. App Quality Insights 🪲

    View Slide

  8. New UI
    😎

    View Slide

  9. Kotlin

    View Slide

  10. View Slide

  11. Explicit Fields ✨

    View Slide

  12. Kotlin DSL 🪶
    ● All in one language
    ● More readable
    ● Better compile-time
    checking

    View Slide

  13. Hints & Documentation 💖

    View Slide

  14. Version Catalog 📖
    // build.gradle.kts
    plugins {
    alias(libs.plugins.com.android.application)
    alias(libs.plugins.org.jetbrains.kotlin.android)
    id("com.google.devtools.ksp")
    }
    ...
    dependencies {
    implementation(libs.core.ktx)
    implementation(libs.appcompat)
    }
    // libs.version.toml
    [versions]
    com-android-application = "8.1.0-alpha11"
    org-jetbrains-kotlin-android = "1.8.0"
    core-ktx = "1.9.0"
    appcompat = "1.4.1"
    [libraries]
    core-ktx = { group = "androidx.core", name = "core-ktx",
    version.ref = "core-ktx" }
    appcompat = { group = "androidx.appcompat", name = "appcompat",
    version.ref = "appcompat" }
    [plugins]
    com-android-application = { id = "com.android.application",
    version.ref = "com-android-application" }
    org-jetbrains-kotlin-android = { id =
    "org.jetbrains.kotlin.android", version.ref =
    "org-jetbrains-kotlin-android" }

    View Slide

  15. Kapt to KSP 🫣

    View Slide

  16. Android
    Jetpack

    View Slide

  17. Architecture Libraries and Guidance 🗝

    View Slide

  18. Recommendation
    👌
    https://developer.android.com/topic
    /architecture/recommendations

    View Slide

  19. Modularization 🪱

    View Slide

  20. Dependency Injection 💉

    View Slide

  21. View Slide

  22. Jetpack
    Compose

    View Slide

  23. View Slide

  24. Look at the new Project Template 👀

    View Slide

  25. Jetpack Compose is Android’s recommended
    modern toolkit for building native UI. It simplifies
    and accelerates UI development on Android. Quickly
    bring your app to life with less code, declarative
    Kotlin APIs, powerful tools, and backward
    compatible.

    View Slide

  26. Construct UI by describing what,
    not how.

    View Slide

  27. XML Vs Compose 💥


    android:id=”@+id/listNews” ... />


    // Activity.kt
    val listNews = findViewById(R.id.listNews)
    val textError = findViewById(R.id.textError)
    if (data.size > 0){
    listNews.visibility = View.VISIBLE
    textError.visibility = View.GONE
    } else {
    listNews.visibility = View.GONE
    textError.visibility = View.VISIBLE
    }
    // Activity.kt
    @Composable
    fun NewsScreen(newsList: List)
    {
    if (newsList.size > 0){
    Column {
    for (title in newsList){
    Text(text = title)
    }
    }
    } else {
    Text(text = "No Data!")
    }
    }

    View Slide

  28. Material
    You

    View Slide

  29. View Slide

  30. Look (again) at the new Project Template 👀👀

    View Slide

  31. M2 vs M3 💥

    View Slide

  32. View Slide

  33. View Slide

  34. View Slide

  35. Conclusion 🎁
    d.android.com/modern-android-development

    View Slide

  36. “All you need is the plan, the road map, and
    the courage to press on to your destination.”
    Earl Nightingale

    View Slide

  37. Thank
    you

    View Slide