Android Architecture Componentの Navigationで少しは...

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest. →

Android Architecture Componentの Navigationで少しはまった話

bigbackboom

July 23, 2019

Annual Pro sale · Save $30

Have presentations of your own?

Share with private links, password protection, and more control over your work.

Transcript

16 slides
  1. Navigationͱ͸ʁ — Google I/O 2018Ͱൃද͞ΕͨAndroid Architecture ComponentͷҰͭ — FragmentؒͷભҠΛϘτϜφϏͳͲͰߦ͏ͳͲෳࡶͳཁ݅ ͷͨΊʹ։ൃ͞Εͨɻ

    — backstackͷ؅ཧ͕೉͍͠ — fragmentࣗମͷlifecycle͕ෳࡶ — ݟͨ໨͸iOSͷstoryboardͳͲʹ͍͕ۙɺ࢖༻ൣғ͸͍ͩ
  2. KeepStateNavigator.kt ίʔυΛमਖ਼ ҎԼͷߦΛҰͭ௥Ճ͢Δ͚ͩɻ var fragment = manager.findFragmentByTag(tag) fragment?.arguments = args

    if (fragment == null) { val className = destination.className fragment = manager.fragmentFactory.instantiate(context.classLoader, className) transaction.add(containerId, fragment, tag) } else { transaction.attach(fragment) }

More Decks by bigbackboom

Other Decks in Technology