Skip to content

Instantly share code, notes, and snippets.

@andrzejchm
Last active June 29, 2016 12:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrzejchm/8d291747e77b07fa56b4d88289f88937 to your computer and use it in GitHub Desktop.
Save andrzejchm/8d291747e77b07fa56b4d88289f88937 to your computer and use it in GitHub Desktop.
public abstract class BaseActivity<M extends Serializable, V extends DroidMVPView, P extends DroidMVPPresenter<V, M>>
extends DroidMVPActivity<M, V, P> {
@Inject protected P presenter;
@NonNull @Override protected P createPresenter() {
//this field will be populated by field injeciton from dagger
// your presenter should not accept the presentationModel as its constructor's paramteter.
// Instead, it will be provided to your presenter in #attachView method.
return presenter;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment