I was looking at the google samples for MVP and I saw this as the last statement in onCreate
of the activity:
new TaskDetailPresenter(
taskId,
Injection.provideTasksRepository(getApplicationContext()),
taskDetailFragment);
This code seems weird to me.
It instantiates an object that is local and not assigned anywhere and in it associates the fragment with the presenter.
Is this really how it is supposed to be done? Because it seems not a good practice to me
Aucun commentaire:
Enregistrer un commentaire