Home > Mobile >  Questions about Android use Dagger2
Questions about Android use Dagger2

Time:09-19

Dagger2 learned a couple of days, the official start of the project is now in, but has just written a few lines of code will pop up a question:
If my Presenter or need to use the bean in the model, that is I need to create in the Moudle incoming, in the form of a constructor or can be directly in the Presenter or model new directly used an object? The
 public SplashPresenter (ICommonView ICommonView, ClassDataBean beans) {
Enclosing iCommonView=iCommonView;
}
or the
 public void checkData () {
ClassDataBean bean=new ClassDataBean ();
}
  • Related