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

Multi-module+Navigation

 Multi-module+Navigation

Masatoshi Kubode

June 18, 2019
Tweet

More Decks by Masatoshi Kubode

Other Decks in Programming

Transcript

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

    ϞδϡʔϧΛ·͍ͨͩભҠ͕ߟྀ͞Ε͍ͯΔ ࣮૷ྫΛௐ΂Δ
  2. ©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
  3. ©2019 Wantedly, Inc. • ΞϓϦͰ1ͭͷXML • Լ૚ϞδϡʔϧʹXML • featureͰsafe-args͕࢖͑Δ •

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

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

    ্૚ͷXMLͰfeatureͷXMLΛ͢΂ͯincludeͯ͠·ͱΊΔ • IDEαϙʔτ͋Γ • featureͰsafe-args͕࢖͑Δ • ભҠઌͷDeepLinkΛ஌Βͳ͍ͱ͍͚ͳ͍ Jetpack Navigation
  6. ©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) }