juliocbcotta
03/24/2017, 4:41 PM@Module(subcomponents = ComponentA.class)
public class ActivityAModule
@Inject
ActivityA activity;
@Provides
@ActivityScope
public providePresenter()
{
return new PresenterA( (View) activity);
}
@Binds
@IntoMap
@ActivityKey(ActivityA.class)
abstract AndroidInjector.Factory<? extends Activity> bindActivityInjectorFactory(MainComponent.Builder builder);
The modules that don`t need the Activity.. would not need to have the instance..trevjones
03/24/2017, 4:54 PM@BindsInstance
method on your component builder or a @Provides
from a module. But because the creation of the component is abstracted away out of your control you can’t actually provide the instance of the activity in order to perform the binding via either the component builder binds instance method or via module constructor injection.juliocbcotta
03/24/2017, 9:43 PM@BindInstance
, but I am failingtrevjones
03/24/2017, 11:17 PMjuliocbcotta
03/27/2017, 2:03 PM