TangleGraph

object TangleGraph

Holds a reference to the application's Dagger graph, so that it can be accessed by TangleViewModelFactory.

This should be initialized as soon as possible after initializing the AppComponent.

Since

0.10.0

Samples

import android.app.Application
import tangle.inject.TangleGraph
fun main() {
   //sampleStart
   class MyApplication : Application() {

  override fun onCreate() {
    super.onCreate()

    val appComponent = DaggerMyAppComponent.factory()
      .create(this)

    TangleGraph.init(appComponent)
  }
}
   //sampleEnd
}

Functions

init
Link copied to clipboard
fun init(component: Any)
Sets a reference to the application's Dagger graph, so that it can be accessed by TangleViewModelFactory.

Sources

androidJvm source
Link copied to clipboard