~/talk

Using Dagger2 to Keep Android SDK Dependencies Clean

TalkinJapaneseat DroidKaigi 2018 · 2018-02-08..02-09· [android, kotlin]
name:kr9ly
links:none on file
slides:none on file

Practical guide to using Dagger 2 to move Android SDK dependencies (Context, FragmentManager, Intents, transitions) out of app logic into the dependency-injection graph in an MVVM + DataBinding app. Covers splitting scopes into Singleton and Lifecycle, creating per-screen subcomponents, two patterns for providing/detaching Context, delegate vs instanceof selection for FragmentManager, an Intent-builder + TransitionHandler pattern, and lifecycle handling via Architecture Components or a custom callback controller.

AI-written summary · about

  1. 0:00Dagger2 for Android
  2. 2:58Why use Dagger2
  3. 4:24Scope annotations
  4. 12:47Separating context deps
  5. 15:47Screen transitions
  6. 19:52Activity/fragment callbacks
  7. 25:37Best practices
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.