Multi-module+Navigation

 Multi-module+Navigation

E505897a79eede1a676f92740261e8f8?s=128

Masatoshi Kubode

June 18, 2019
Tweet

Transcript

  1. ©2019 Wantedly, Inc. .VMUJNPEVMF /BWJHBUJPO QPUBUPUJQT ٱอग़խढ़ 2019/06/18

  2. ©2019 Wantedly, Inc. ٱอग़խढ़ 8BOUFEMZ ओʹ8BOUFEMZ7JTJUͷ"OESPJEΞϓϦΛ։ൃ͍ͯ͠·͢ɻ ࠷ۙΞϓϦϦχϡʔΞϧ͕Ұஈམͨ͠ ,PUMJO .BHJDUIF(BUIFSJOH 1PLFNPO(P

    ࣗݾ঺հ 5XJUUFS !TXJ[@BSE (JU)VC !LVCPEF
  3. ©2019 Wantedly, Inc. w "OESPJE9/BWJHBUJPOBMQIB w /BWJHBUJPO৮ͬͨ͜ͱ͋Δਓ޲͚ w Ϟδϡʔϧ͸͜͏͍͏ߏ੒ w

    ਐߦܗͰະϦϦʔε લఏ
  4. ©2019 Wantedly, Inc. w (6*9.-ͰભҠਤ͕ఆٛͰ͖Δ w %FFQ-JOL w TBGFBSHT AndroidX

    Navigation
  5. ©2019 Wantedly, Inc.  8IZ.VMUJNPEVMF /BWJHBUJPO  .VMUJNPEVMF /BWJHBUJPOͷ࣮૷ύλʔϯ 

    ࠾༻ͨ͠ख๏  ·ͱΊ ࿩͢͜ͱ
  6. ©2019 Wantedly, Inc. 8IZ.VMUJNPEVMF /BWJHBUJPO

  7. ©2019 Wantedly, Inc. w Ҏલ͔ΒϚϧνϞδϡʔϧԽΛਐΊ͍ͯͨ w $PNNPO"DUJWJUZ'SBHNFOU w ΍͹͍΍ͭ w

    ґଘੑͷմ Why
  8. ©2019 Wantedly, Inc. w $PNNPO'SBHNFOU w ਌͕$PNNPO"DUJWJUZ͡Όͳ͍ͱͩΊ w GSBHNFOUUFTUJOH͕࢖͑ͳ͍ w

    ભҠઌͷ'SBHNFOUͷࢀর͕ඞཁ w Ϟδϡʔϧ෼ׂͷअຐʹ Why
  9. ©2019 Wantedly, Inc. w ςελϒϧʹ͍ͨ͠ w ґଘੑΛݮΒ͍ͨ͠ w $PNNPO"DUJWJUZ'SBHNFOUΛফ͍ͨ͠ 

    /BWJHBUJPOͰղܾ͠Α͏ Why
  10. ©2019 Wantedly, Inc. .VMUJNPEVMF /BWJHBUJPOͷ࣮૷ࣄྫ

  11. ©2019 Wantedly, Inc. w ಋೖલʹ࣮૷ྫΛௐࠪ w ৚݅ w ಉ͡Α͏ͳϞδϡʔϧߏ੒ w

    ϞδϡʔϧΛ·͍ͨͩભҠ͕ߟྀ͞Ε͍ͯΔ ࣮૷ྫΛௐ΂Δ
  12. ©2019 Wantedly, Inc. w %SPJE,BJHJDPOGFSFODFBQQ • https://github.com/DroidKaigi/conference-app-2019 w /BWJHBUJPOJO.VMUJ.PEVMF1SPKFDUT •

    https://proandroiddev.com/navigation-in-multi-module-projects-9a5c53ad219 w +FUQBDL/BWJHBUJPO • https://events.google.com/io/schedule/events/2d0cb491-325a-48fb-8eea-6a9452f3b33b Link
  13. ©2019 Wantedly, Inc. • ΞϓϦͰ1ͭͷXML • Լ૚ϞδϡʔϧʹXML • featureͰsafe-args͕࢖͑Δ •

    IDEαϙʔτ͕ͳ͍ • featureͷԼ૚ͳͷͰFragment͕ݟ͑ͳ͍ DroidKaigi2019
  14. ©2019 Wantedly, Inc. • ProAndroidDevͷهࣄ • ΞϓϦͰ1ͭͷXML • ্૚ϞδϡʔϧʹXML •

    Լ૚ϞδϡʔϧʹΠϯλʔϑΣʔε • IDEαϙʔτ͋Γ • featureͰsafe-args͕࢖͑ͳ͍ • ΠϯλʔϑΣʔεͱ࣮૷ͷϝϯς • DI͕ඞཁ Navigation in Multi-Module Projects
  15. ©2019 Wantedly, Inc. • Google I/O 2019ͷηογϣϯ • feature͝ͱʹ1ͭͷXML •

    ্૚ͷXMLͰfeatureͷXMLΛ͢΂ͯincludeͯ͠·ͱΊΔ • IDEαϙʔτ͋Γ • featureͰsafe-args͕࢖͑Δ • ભҠઌͷDeepLinkΛ஌Βͳ͍ͱ͍͚ͳ͍ Jetpack Navigation
  16. ©2019 Wantedly, Inc. Jetpack Navigation

  17. ©2019 Wantedly, Inc. ࠾༻ͨ͠ख๏

  18. ©2019 Wantedly, Inc. w νʔϜͰ૬ஊ͠(PPHMF*0ͷํ๏Λ࠾༻ͨ͠ w %FFQ-JOL͸TFBMFEDMBTTΛఆٛ w 63*΂ͨॻ͖Λ๷͙ ࠾༻ͨ͠ख๏

  19. ©2019 Wantedly, Inc. ࠾༻ͨ͠ख๏ sealed class MyDestination(path: String) { val

    deepLink = "my://$path".toUri() data class Feature1(val id: Int) : MyDestination("feature1/$id") data class Feature2(val id: Int) : MyDestination("feature2/$id") } fun onClick() { navController.navigate(MyDestination.Feature1(1).deepLink) }
  20. ©2019 Wantedly, Inc. ·ͱΊ

  21. ©2019 Wantedly, Inc. w ࣮૷ύλʔϯ͸͍͔ͭ͋͘Δ w ૬ஊͯ͠࠷దͳ࣮૷ΛબͿͱྑͦ͞͏ w "MQIBͳͷͰόά͕ଟ͍ɺ֮ޛ͕ඞཁ ·ͱΊ

  22. ©2019 Wantedly, Inc.