intro to navigation

intro to navigation

Google IO 2018報告会。
Androidでの navigation というライブラリの発表です。

3c4e24fd827c789cb67a9f759f057b06?s=128

Shinnosuke Kugimiya

May 29, 2018
Tweet

Transcript

  1. © DMM.com !LHNZTIJO (PPHMF*0ࢀՃใࠂձ *OUSPUPOBWJHBUJPO

  2. © DMM.com w LHNZTIJOఝٶ ͗͘Έ΍  w "OESPJEΤϯδχΞ w %..DPNϥϘ$50ࣨॴଐ

    w ೥݄͔Β ࣗݾ঺հ  
  3. © DMM.com   BHFOEB

  4. © DMM.com w OBWJHBUJPOͱ͸ w ͳʹ͕خ͍͠ͷ͔ʁ w ભҠάϥϑʹ͍ͭͯ w TBGFBSHTʹ͍ͭͯ

    w ·ͱΊ BHFOEB  
  5. © DMM.com ͜ͷൃදͰઆ໌͠ͳ͍͜ͱ w OBWJHBUJPOͷࡉ͔͍ಋೖํ๏ w OBWJHBUJPOͷकΔ΂͖ݪଇ w %FFQ-JOLͷઃఆํ๏ w

    #PUUPN/BWJHBUJPOͱ͔5PPMCBSͱ͔ͷ࿈ܞํ๏ w ͳͲͳͲࡉ͔͍಺༰  
  6. © DMM.com ͕࣌ؒ୹͍ͷͰʜ   IUUQTJOTJEFENNDPNFOUSZBOESPJEOBWJHBUJPO ৄ͘͠͸ɺϒϩάΛݟΔ͔ɺ࠙਌ձͰ࿩͔͚͍ͯͩ͘͠͞ʂ

  7. © DMM.com ͜ͷൃදΰʔϧ   OBWJHBUJPO͕Ͳ͏͍͏΋ͷ͔Θ͔Γɺ Կ͕خ͍͠ͷ͔ͷΠϝʔδΛ࣋ͬͯ΋Β͏͜ͱ

  8. © DMM.com   OBWJHBUJPOͱ͸

  9. © DMM.com OBWJHBUJPOͱ͸ OBWYNMΛॻ͍ͯɺ ͦΕ௨Γʹʢ։ൃऀ͕ʣભҠͤ͞Δ͜ͱͰɺ ը໘ભҠΛ༰қʹ͢ΔϥΠϒϥϦ  

  10. © DMM.com /BWJHBUJPO&EJUPSͰOBWYNMΛॻ͍ͯ  

  11. © DMM.com YNMʹભҠάϥϑΛॻ͍ͦΕ௨Γʹʢ։ൃऀ͕ʣભҠͤ͞Δ   view.findNavController().navigate(R.id.toDestAction, bundle) ద੾ͳ৔ॴͰɺ ద੾ͳ*%ͱɺద੾ʹ࡞ͬͨ#VOEMFΛ OBWJHBUJPOϝιουʹࢦఆ͢Ε͹

    ͜Ε͚ͩͰɺը໘ભҠ͕Ͱ͖Δʂ
  12. © DMM.com   ͳʹ͕خ͍͠ͷ͔ʁ

  13. © DMM.com /PNPSFGSBHNFOUUSBOTBDUJPO   ೉ղͳ 'SBHNFOU5SBOTBDUJPOΛ Ұ੾ߟ͑ͳͯ͘ྑ͘ͳΔ SFQMBDF BEE

    TIPX DPNNJU DPNNJU/PX
  14. © DMM.com ભҠάϥϑʹΑͬͯը໘ભҠ͕Ұ໨ྎવ   ը໘ભҠ͕Ұ໨ྎવʂ

  15. © DMM.com ʜ   ը໘ભҠ͕Ұ໨ྎવʂ

  16. © DMM.com ʜ   ը໘ભҠ͕Ұ໨ྎવʂ ʜJ04ͷ4UPSZCPBSEͰ͸

  17. © DMM.com ʜ   ը໘ભҠ͕Ұ໨ྎવʂ ը໘4UPSZCPBSEͱ͔ ͦ΋ͦ΋࢖Θͳ͍ͱ͔ Έ͍ͨͳ࿩͕ग़͖ͯͯΔ͚Ͳ "OESPJE΋ಉ͡ײ͡ʹͳΔͷʁ

  18. © DMM.com 4UPSZCPBSEͱͷҧ͍   4UPSZCPBSE͸ "OESPJEͰ͍͏MBZPVUYNM ը໘ભҠ OBWJHBUJPO͸ը໘ભҠͷΈ

  19. © DMM.com ભҠઌ͕"DUJWJUZͰ΋'SBHNFOUͰ΋ಉ͡ॻ͖ํʂ   view.findNavController().navigate(R.id.toDestAction, bundle) ભҠݩ "DUJPO ʁʁʁ

    ભҠݩ͸"DUJPO*EΛࢦఆ͢Δ͚ͩͰɺ ର৅͕"DUJWJUZͩΖ͏ͱ'SBHNFOUͩΖ͏ͱ ಉ͡ίʔυͰॻ͘͜ͱ͕Ͱ͖Δ
  20. © DMM.com   OBWYNMʹ͍ͭͯ

  21. © DMM.com OBWYNM   ભҠ͕Ұ໨ྎવ

  22. © DMM.com OBWYNM   ͨͩɺ͜ͷάϥϑ͸ભҠͷ ࢓༷ͷΑ͏ͳ΋ͷͱࢥͬͨํ͕ ͍͍͔΋

  23. © DMM.com ஫ҙ఺   OBWYNMΛॻ͍ͯɺ ͦΕ௨Γʹʢ։ൃऀ͕ʣભҠͤ͞Δ͜ͱͰɺ ը໘ભҠΛ༰қʹ͢ΔϥΠϒϥϦ

  24. © DMM.com ஫ҙ఺   OBWYNMΛॻ͍ͯɺ ͦΕ௨Γʹʢ։ൃऀ͕ʣભҠͤ͞Δ͜ͱͰɺ ը໘ભҠΛ༰қʹ͢ΔϥΠϒϥϦ զʑ։ൃऀ͕୲อ͠ͳ͚Ε͹ͳΒͳ͍

  25. © DMM.com ஫ҙ఺   OBWYNMΛॻ͍ͯɺ ͦΕ௨Γʹʢ։ൃऀ͕ʣભҠͤ͞Δ͜ͱͰɺ ը໘ભҠΛ༰қʹ͢ΔϥΠϒϥϦ view.findNavController().navigate(R.id.toDestAction, bundle)

    ͦΕ௨ΓͰͳ͍৔߹͸ɺ
  26. © DMM.com ஫ҙ఺   OBWYNMΛॻ͍ͯɺ ͦΕ௨Γʹʢ։ൃऀ͕ʣભҠͤ͞Δ͜ͱͰɺ ը໘ભҠΛ༰қʹ͢ΔϥΠϒϥϦ view.findNavController().navigate(R.id.toDestAction, bundle)

    ͦΕ௨ΓͰͳ͍৔߹͸ɺ *MMFHBM"SHVNFOU&YDFQUJPO
  27. © DMM.com   TBGFBSHTʹ͍ͭͯ

  28. © DMM.com OBWJHBUFϝιουʹJEΛࢦఆ͢Δ   view.findNavController().navigate(R.id.toDestAction, bundle) ؒҧͬͨJEΛࢦఆ͠ͳ͍ͨΊʹ͸ ໋໊نଇΛ޻෉͢Δ͜ͱͰ ͍͘Β͔ܰݮͰ͖Δ

  29. © DMM.com OBWJHBUFϝιουʹJEΛࢦఆ͢Δ   view.findNavController().navigate(R.id.toDestAction, bundle) ؒҧͬͨJEΛࢦఆ͠ͳ͍ͨΊʹ͸ ໋໊نଇΛ޻෉͢Δ͜ͱͰ ͍͘Β͔ܰݮͰ͖Δ

    TBGFBSHTΛ࢖͑͹΋ͬͱܰݮͰ͖Δʂ
  30. © DMM.com TBGFBSHTΛ࢖ͬͨ৔߹   view.findNavController().navigate( HogeFragmentDirections.toDestAction() ) )PHF'SBHNFOULU

  31. © DMM.com TBGFBSHTΛ࢖ͬͨ৔߹   view.findNavController().navigate( HogeFragmentDirections.toDestAction() ) )PHF'SBHNFOULU ͦͷը໘͔Βੜ͑ͯΔભҠ͕ϝιουʹͳΔɻ

    Ұݸ͔͠ભҠ͕ͳ͍৔߹͸ɺ Ұݸ͔͠ϝιου͕ੜ͑ͳ͍ͷͰ ؒҧ͑Α͏͕ͳ͍ɻ
  32. © DMM.com TBGFBSHTΛ࢖ͬͨ৔߹   view.findNavController().navigate( HogeFragmentDirections.toDestAction() ) )PHF'SBHNFOULU ੜ੒͞ΕΔ΋ͷ͕ɺ

    ੜ੒͞ΕΔ'SBHNFOU໊ %JSFDUJPOT ͱ͍͏໊લʹͳ͍ͬͯΔɻ ؒҧ͑ͮΒ͍ɺϨϏϡʔͰ͙͢ؾ͚ͮΔɻ
  33. © DMM.com TBGFBSHT࢖͍͖ͬͯ·͠ΐ͏ TBGFBSHT࢖͍͖ͬͯ·͠ΐ͏  

  34. © DMM.com   ·ͱΊ

  35. © DMM.com ·ͱΊ   w OBWJHBUJPOͱ͸ը໘ભҠͷͨΊͷϥΠϒϥϦ w /P.PSF'SBHNFOU5SBOTBDUJPO w

    OBWYNM͸ը໘ભҠͷ࢓༷ w TBGFBSHTΛ࢖͏͜ͱͰɺϛεΛݮΒͤΔ