Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
public class MyApplication extends Application implements HasActivitySubcomponentBuilders {
Map<Class<? extends Activity>, ActivityComponentBuilder> activityComponentBuilders;
private AppComponent appComponent;
public static HasActivitySubcomponentBuilders get(Context context) {
return ((HasActivitySubcomponentBuilders) context.getApplicationContext());
public void onCreate() {
appComponent = DaggerAppComponent.create();
public ActivityComponentBuilder getActivityComponentBuilder(Class<? extends Activity> activityClass) {
return activityComponentBuilders.get(activityClass);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment