winter-androidx / io.jentz.winter.androidx / AndroidPresentationScopeInjectionAdapter

AndroidPresentationScopeInjectionAdapter

open class AndroidPresentationScopeInjectionAdapter : SimpleAndroidInjectionAdapter

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()

Constructors

<init>

AndroidPresentationScopeInjectionAdapter(winterApplication: WinterApplication)

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

Inherited Properties

app

val app: WinterApplication

Functions

getActivityParentGraph

open fun getActivityParentGraph(activity: Activity): Graph

Inherited Functions

close

open fun close(instance: Any): Unit

closeActivityGraph

open fun closeActivityGraph(activity: Activity): Unit

closeFragmentGraph

open fun closeFragmentGraph(fragment: Fragment): Unit

get

open fun get(instance: Any): Graph?

getActivityGraph

open fun getActivityGraph(activity: Activity): Graph?

getApplicationGraph

open fun getApplicationGraph(application: Application): Graph?

getBroadcastReceiverGraph

open fun getBroadcastReceiverGraph(receiver: BroadcastReceiver): Graph?

getContentProviderGraph

open fun getContentProviderGraph(contentProvider: ContentProvider): Graph?

getContextWrapperGraph

open fun getContextWrapperGraph(contextWrapper: ContextWrapper): Graph?

getFragmentGraph

open fun getFragmentGraph(fragment: Fragment): Graph?

getServiceGraph

open fun getServiceGraph(service: Service): Graph?

getViewGraph

open fun getViewGraph(view: View): Graph?

setupActivityGraph

open fun setupActivityGraph(activity: Activity, builder: Builder): Unit