Last active
November 7, 2017 19:13
-
-
Save rachitmishra/e4e0f484751c28bf3a62e398ca0a6621 to your computer and use it in GitHub Desktop.
dagger-android-activity-basic
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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