winter-androidx / io.jentz.winter.androidx / AndroidPresentationScopeInjectionAdapter / <init>

<init>

AndroidPresentationScopeInjectionAdapter(winterApplication: WinterApplication)

Extended version of SimpleAndroidInjectionAdapter that retains a PresentationScope subgraph during Activity re-creation (configuration changes).

It expects an application component like:

Winter.component {
  // this sub-graph outlives configuration changes and is only disposed when Activity
  // isFinishing == true
  subcomponent(PresentationScope::class) {
    // this is recreated every time the Activity is recreated
    subcomponent(ActivityScope::class) {
    }
  }
}
Winter.useAndroidPresentationScopeAdapter()