Skip to content

Instantly share code, notes, and snippets.

@rachitmishra
Last active November 7, 2017 19:13
Show Gist options
  • Save rachitmishra/e4e0f484751c28bf3a62e398ca0a6621 to your computer and use it in GitHub Desktop.
Save rachitmishra/e4e0f484751c28bf3a62e398ca0a6621 to your computer and use it in GitHub Desktop.
dagger-android-activity-basic
/**
* Declaring application with `ComputerComponent` instance
*/
class MyApplication: Application() {
lateinit var computerComponent: ComputerComponent // Declaring our component instance
@Override
public void onCreate() {
initComputerComponent()
}
public void initComputerComponent() {
computerComponent = DaggerComputerComponent.builder()
.build() // Instantiating our computer component
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment