γϯάϧϞδϡʔϧͰͷ%BHHFSΛ༻͍ͨ%FQFOEFODZ*OKFDUJPO w ϚϧνϞδϡʔϧͰͷ%FQFOEFODZ*OKFDUJPOͷਏ͞ w %BHHFSΛͬͯϚϧνϞδϡʔϧϓϩδΣΫτͰ%*Λ࣮ݱ͢Δ w %ZOBNJD'FBUVSF.PEVMF͕͋Δ࣌ͷʢ͕࣌ؒ͋Εʣ "HFOEB ΰʔϧ ϚϧνϞδϡʔϧͰߏ͞ΕͨϓϩδΣΫτͰɺ %BHHFSΛ༻͍ͨ%FQFOEFODZ*OKFDUJPOΛߦ͏ࡍͷ ΈϙΠϯτΛΓɺͦͷղܾࡦΛཧղ͢Δɻ
.BJO"DUJWJUZʹJOKFDU͢Δํ๏ w 4VC"DUJWJUZʹJOKFDU͢Δํ๏ w .BJO'SBHNFOUʹJOKFDU͢Δํ๏ w 4VC'SBHNFOUʹJOKFDU͢Δํ๏ class Application : HasSupportFragmentInjector { @Inject lateinit var dispatchingFragmentInjector … DaggerAppComponent.create().inject(this) … }
var dispatchingFragmentInjector } Έ $PNQPOFOU w .BJO'SBHNFOUʹJOKFDU͢Δํ๏ w 4VC'SBHNFOUʹJOKFDU͢Δํ๏ w .BJO"DUJWJUZʹJOKFDU͢Δํ๏ w 4VC"DUJWJUZʹJOKFDU͢Δํ๏ w .BJO'SBHNFOUʹJOKFDU͢Δํ๏ w 4VC'SBHNFOUʹJOKFDU͢Δํ๏
lateinit var dispatchingFragmentInjector } w .BJO'SBHNFOUʹJOKFDU͢Δํ๏ w 4VC'SBHNFOUʹJOKFDU͢Δํ๏ class MainFragment : Fragment() { ɹɹ… AndroidSupportInjection.inject(this) … }
lateinit var dispatchingFragmentInjector } w .BJO'SBHNFOUʹJOKFDU͢Δํ๏ w 4VC'SBHNFOUʹJOKFDU͢Δํ๏ class MainFragment : Fragment() { ɹɹ… AndroidSupportInjection.inject(this) … } class MainActivity : AppCompatActivity() { … } HasSupportFragmentInjectorΛ࣮ͯ͠Δ͔ʁ
lateinit var dispatchingFragmentInjector } w .BJO'SBHNFOUʹJOKFDU͢Δํ๏ w 4VC'SBHNFOUʹJOKFDU͢Δํ๏ class MainFragment : Fragment() { ɹɹ… AndroidSupportInjection.inject(this) … } class MainActivity : AppCompatActivity() { … } HasSupportFragmentInjectorΛ࣮ͯ͠Δ͔ʁ
lateinit var dispatchingFragmentInjector } w .BJO'SBHNFOUʹJOKFDU͢Δํ๏ w 4VC'SBHNFOUʹJOKFDU͢Δํ๏ class MainFragment : Fragment() { ɹɹ… AndroidSupportInjection.inject(this) … } class MainActivity : AppCompatActivity() { … } HasSupportFragmentInjectorΛ࣮ͯ͠Δ͔ʁ
AndroidSupportInjection.inject(this) … } class MainActivity : AppCompatActivity() { … } HasSupportFragmentInjectorΛ࣮ͯ͠Δ͔ʁ class Application : HasSupportFragmentInjector { @Inject lateinit var dispatchingFragmentInjector } w .BJO'SBHNFOUʹJOKFDU͢Δํ๏ w 4VC'SBHNFOUʹJOKFDU͢Δํ๏
var dispatchingFragmentInjector } w .BJO'SBHNFOUʹJOKFDU͢Δํ๏ w 4VC'SBHNFOUʹJOKFDU͢Δํ๏ Έ class MainFragment : Fragment() { ɹɹ… AndroidSupportInjection.inject(this) … } class MainActivity : AppCompatActivity() { … } HasSupportFragmentInjectorΛ࣮ͯ͠Δ͔ʁ
var dispatchingFragmentInjector } w .BJO'SBHNFOUʹJOKFDU͢Δํ๏ w 4VC'SBHNFOUʹJOKFDU͢Δํ๏ Έ class MainFragment : Fragment() { ɹɹ… AndroidSupportInjection.inject(this) … } class MainActivity : AppCompatActivity() { … } HasSupportFragmentInjectorΛ࣮ͯ͠Δ͔ʁ