I have a module FragmentModule
@Module
public class FragmentModule
{
@Provides
public static PickerDashboardFragment providesPickerDashboard(int status, String name, Object someComplexObject)
{
PickerDashboardFragment fragment = new PickerDashboardFragment();
Bundle b = new Bundle();
b.putInt("status", status);
b.putString("name", name);
b.putInt("object", someComplexObject);
fragment.setArguments(bundle);
return fragment;
}
@Provides
public static PickingFragment providesPickingFragment()
{
PickingFragment fragment = new PickingFragment();
return fragment;
}
}
Here's my Component class
@Component(modules = {UtilModule.class, FragmentModule.class})
public interface ApplicationComponent
{
void inject(PickerDashboardActivity target);
}
In my activity this is how i'm injecting the PickerDashboardActivity
@Inject
PickerDashboardFragment frag;
ApplicationComponent component = DaggerApplicationComponent.builder().build();
component.inject(this);
My question is what's the best and easiest way to provide the dependencies for PickerDashboardFragment providesPickerDashboard(int status, String name, Object someComplexObject)
i.e status, name and someComplexObject.
Best Regards