Created
April 16, 2016 21:37
-
-
Save frogermcs/83d9f38a57826d637eaff3353c716ca2 to your computer and use it in GitHub Desktop.
Async injection with Dagger 2 and RxJava
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
public class SplashActivity extends BaseActivity { | |
@Inject | |
SplashActivityPresenter presenter; | |
@Inject | |
AnalyticsManager analyticsManager; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
} | |
//This method is called in super.onCreate() method | |
@Override | |
protected void setupActivityComponent() { | |
final SplashActivityComponent splashActivityComponent = GithubClientApplication.get(SplashActivity.this) | |
.getAppComponent() | |
.plus(new SplashActivityModule(SplashActivity.this)); | |
splashActivityComponent.inject(SplashActivity.this); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment