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

Android Jetpack 2018-2019

Android Jetpack 2018-2019

Google I/O Extended Tokyo 2019 での LT です。
https://yj-meetup.connpass.com/event/126019/

kumamotone

May 08, 2019
Tweet

More Decks by kumamotone

Other Decks in Technology

Transcript

  1. ࣗݾ঺հ • ۽ຊ ࿨ਖ਼ (@kumamo_tone) • iOS/AndroidΞϓϦΤϯδχΞˏϠϑʔ • ษڧձӡӦ •

    དྷ݄ WWDC ࢀՃ͠·͢ • ࠷ۙ͸DMMӳձ࿩ͱγϟχϚεΛ΍͍ͬͯ·͢
  2. Android P Beta ɾ"EBQUJWF#BUUFSZ ɹɾϢʔβʔͷߦಈΛֶश͠ɺόοςϦʔΛઅ໿ ͯ͘͠ΕΔʢΒ͍͠ʣ ɾ%BTICPBSE "QQ5JNFS 8JOE%PXO ɹɾ%JHJUBM8FMMCFJOHπʔϧ

    ˞͜ͷࠒ͸1JYFMͷ೔ຊͰͷൃച͸ൃද͞Ε͓ͯΒ ͣɺ೔ຊͰ།Ұ߹๏తʹݕূͰ͖Δ୺຤͸ &TTFOUJBMQIPOF 1) ͷΈͱ͍͏ঢ়گͩͬͨ https://www.youtube.com/watch?v=ogfYd705cRs
  3. Android Jetpack ͖͜͜͢ Android Jetpack ख্͛ͯΔͷ ͔Θ͍͍ ੜ਎Ͱ ඈߦͯ͠ େৎ෉

    ͳͷ͔ʁ https://developer.android.com/images/jetpack/jetpack-hero.svg
  4. Android Jetpack • Jetpack ͸ɺ༏Εͨ Android ΞϓϦΛ؆୯ ʹ։ൃͰ͖ΔΑ͏ʹ͢ΔͨΊͷ Android ι

    ϑτ΢ΣΞ ίϯϙʔωϯτͷίϨΫγϣϯ Ͱ͢ɻ • ͜ΕΒͷίϯϙʔωϯτʹΑΓɺϘΠϥʔϓ Ϩʔτ ίʔυΛ࡞੒͢ΔखؒΛͳ͘͠ɺ͓ ͢͢Ίͷํ๏ʹԊͬͯ։ൃΛਐΊͳ͕Βɺ ෳࡶͳλεΫΛ؆ૉԽͰ͖ΔͷͰɺίʔυ ͷॏཁͳ෦෼ʹूத͢Δ͜ͱ͕Ͱ͖·͢ɻ jetpack-hero.svg https://developer.android.com/jetpack?hl=JA https://developer.android.com/images/jetpack/jetpack-hero.svg
  5. Android Jetpack • ΞϓϦ։ൃΛՃ଎ͤ͞ΔެࣜϥΠϒϥϦʢʴΨΠυϥΠϯͳͲʁʣ • ϥΠϑαΠΫϧ؅ཧͳͲͷΊΜͲ͍͘͞෦෼Λ΍ͬͯ͘ΕΔ • ϕετϓϥΫςΟεʹ৐͔ͬΔ͜ͱ͕Ͱ͖Δ • androidx.*

    ύοέʔδͰߏ੒͞ΕΔ • Android API͔Βಠཱ͍ͯ͠Δ • ͭ·ΓɺԼҐޓ׵ੑ͕͋Δͱ͍͏͜ͱ • ͭ·Γɺ࠷৽͔ͭ࠷ߴͷόʔδϣϯͷ Jetpack ίϯϙʔωϯτΛৗ ʹར༻͢Δ͜ͱ͕Ͱ͖Δͱ͍͏͜ͱʢڧؾʣ
  6. AndroidX • Support Library ͷ৽࣌୅ͷນ։͚ͱͳΔɺ৽͍͠ Android ֦ுػೳ ϥΠϒϥϦ • ݱࡏɺαϙʔτ͞ΕΔ࠷খ

    SDK Ϩϕϧ͸ 14 Ͱ͕͢ɺʮv7ʯͱ͍͏໊ લ͕෇͍ͨίϯϙʔωϯτ΍ύοέʔδ͕Ҿ͖ଓ͖ଘࡏ͍ͯ͠·͢ɻ ͲΕ͕ϓϥοτϑΥʔϜʹόϯυϧ͞Ε͍ͯΔ API ͰɺͲΕ͕ Android ͷ͞·͟·ͳόʔδϣϯͰಈ࡞͢ΔΞϓϦ σϕϩούʔ༻੩ తϥΠϒϥϦͳͷ͔Λ໌֬ʹ۠ผͰ͖ΔΑ͏ʹ͍ͨ͠ͱߟ͍͑ͯ· ͢ɻ AndroidX ͷ঺հ https://developers-jp.googleblog.com/2018/05/hello-world-androidx.html
  7. AndroidX • Support Library͸android.support.*ύοέʔδͩͬͨ • androidx.*͸Support Library ͓ΑͼArchitecture ComponentsΛؚ ΉɺOSʹόϯυϧ͞Ε͍ͯͳ͍ϥΠϒϥϦͷΈͱ͢Δ

    • ͨͱ͑͹: • PackageManager ͸ android.*ʢOSʹόϯυϧ͞Ε͓ͯΓɺ Android όʔδϣϯ͝ͱʹ API ΍ಈ࡞͕ҟͳΔ৔߹͕͋Δʣ • AppCompatActivity ΍ ViewModel ͸ androidx.* AndroidX ͷ঺հ https://developers-jp.googleblog.com/2018/05/hello-world-androidx.html
  8. αϯϓϧ (Android Sunflower) • JetpackΛ࢖ͬͨAndroid։ൃͷ ϕετϓϥΫςΟεΛઆ໌͢Δ ΨʔσχϯάΞϓϦ • Android Sunflower

    is currently released as an alpha and is under heavy development.ʢLast updated: Oct 11, 2018) https://github.com/googlesamples/android-sunflower
  9. Android Jetpack(AndroidX) Release Notes • Release Notes ͱ Release Note

    Archive ͕͋Δ https://developer.android.com/jetpack/androidx?hl=JA
  10. AndroidX Release Notes Archive • Ҡߦظલޙ (2018೥12݄ʙ2019೥1݄ʣҎલͷ΋ͷ͸ͬͪ͜ • AndroidX was

    originally developed by three separate teams. Β͍͠ https://developer.android.com/jetpack/androidx/releases/archive?hl=JA
  11. Navigation • Version 2.1.0-alpha02 • (April 3rd, 2019) • Version

    2.0.0 • (March 14, 2019) Android Jetpack Navigation ͷ҆ఆ൛ϦϦʔε https://developers-jp.googleblog.com/2019/04/android-jetpack-navigation-stable.html
  12. WorkManager Android Developers Blog: Android Jetpack WorkManager Stable Release https://android-developers.googleblog.com/2019/03/android-jetpack-workmanager-stable.html

    • Version 2.1.0-alpha01(April 24, 2019) • APIมߋ • Version 2.0.1(April 9, 2019) • όάमਖ਼ • Version 2.0.0(March 20, 2019)
  13. Room • Version 1.1.1(June 19, 2018) • Version 2.0.0-beta01(October 8,

    2018) • Full Text Search (@Fts4) • Views • AutoValue • Rx Support • Version 2.1.0-alpha07 (April 25, 2019) • Coroutines Support
  14. Room • શจݕࡧ(@Fts4) @Entity @Fts4 data class Mail { @PrimaryKey

    val id: Long, val subject: String, val body: String, val timestamp: Long } http://yaraki.github.io/slides/aac-paging/index.html#17 @Dao interface MailDao { @Query("SELECT * FROM Mail WHERE Mail MATCH :q") fun search(q: String): List<Mail> }
  15. Room • Version 1.1.1(June 19, 2018) • Version 2.0.0-beta01(October 8,

    2018) • Full Text Search (@Fts4) • Views • AutoValue • Rx Support • Version 2.1.0-alpha07 (April 25, 2019) • Coroutines Support
  16. ConstraintLayout • ConstraintLayout 2.0.0 alpha 5 (April 26, 2019) •

    Flow Virtual layout • MotionLayout https://developer.android.com/jetpack/androidx/releases/constraintlayout ConstraintLayout Flowͷ঺հ - stsnϒϩά https://satoshun.github.io/2019/04/constraintlayout-flow/
  17. Android KTX • lifecycle-viewmodel-ktx (2.1.0-alpha01) • ViewModel ͷதͰ viewModelScope.launch {}

    Ͱ͖Δ https://android.googlesource.com/platform/frameworks/support/+/androidx-master-dev/lifecycle/viewmodel/ktx/src/main/java/androidx/lifecycle/ViewModel.kt
  18. androidx.remotecallback • Version 1.0.0-alpha01(December 3, 2018) • Remote Callback is

    a new library aimed at making generating and receiving PendingIntents easier. This is the first version of Remote Callback. • PendingIntentΛ؆୯ʹѻ͑ΔΑ͏ʹ͢ΔͬΆ͍
  19. androidx.viewpager2 • Version 1.0.0-alpha03(April 3rd, 2019) • Comparing to its

    predecessor android.support.v4.view.ViewPager (VP1): • Right-to-left (RTL) layout support • Vertical orientation support • notifyDataSetChanged fully functional (VP1 bugs addressed) • RecyclerViewΛ࢖ͬͨViewPager • ViewPager1ͷόάϑΟοΫεؚ͕·ΕΔΒ͍͠
  20. ͓ΘΓʹ • Android Jetpack࠷ߴʂʂ • ԼҐޓ׵ੑΛ࣋ͬͨศརϥΠϒϥϦΛ
 ެࣜͰఏڙ͠Α͏ͱ͍͏৺ҙؾɺͦͯ͠౒ྗ • WorkManager, Navigation

    ΋ Stable ʹ • ৽ػೳ΍Android-KTXͰͲΜͲΜศརʹͳ͍ͬͯ͘ • ໷໌͚·Ͱ͕࣌ؒ͋ΔͷͰɺ
 ଞʹ΋͍͍ײ͡ͷWhat’s NewΛΈͳ͞·ڭ͍͑ͯͩ͘͞
  21. ̎ "OESPJE։ൃऀతॏେχϡʔε ̌ ̍ ̔ ೥ Android Jetpack ;Γ͔͑Γ ݄༵ਂ໷൪૊෩

    ɹεϥΠυʢϘπʣ ͓ΘΓ ͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ https://developer.android.com/images/jetpack/jetpack-hero.svg