Last active
April 5, 2019 20:06
-
-
Save mitchtabian/c17289f5940bc2335760fd3b1566119d to your computer and use it in GitHub Desktop.
creates the "inject" method automatically with AndroidInjector<Class>
This file contains 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
// *** Must specify specific TYPE here. 'BaseApplication', not 'Application'. Since it generates an inject(BaseApplication app); method. | |
public interface AppComponent extends AndroidInjector<BaseApplication> { // no need for inject method. It's generated. | |
LoginComponent.Builder newLoginComponentBuilder(); | |
// void inject(BaseApplication application); | |
@Component.Builder | |
interface Builder { | |
@BindsInstance | |
Builder application(Application application); | |
AppComponent build(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment