Skip to content

Instantly share code, notes, and snippets.

@maydin
Created November 12, 2016 09:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maydin/dceb2fd287d6b410921cb8a759d49253 to your computer and use it in GitHub Desktop.
Save maydin/dceb2fd287d6b410921cb8a759d49253 to your computer and use it in GitHub Desktop.
Extended Application class
public class App extends Application {
UserComponent userComponent;
@Override
public void onCreate() {
super.onCreate();
userComponent = DaggerUserComponent.builder().userModule(new UserModule()).build();
}
public UserComponent getUserComponent() {
return userComponent;
}
@VisibleForTesting
public void setUserComponent(UserComponent userComponent) {
this.userComponent = userComponent;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment