1 package com.moiseum.wolnelektury.base.mvp;
3 import android.os.Bundle;
5 import com.moiseum.wolnelektury.base.AbstractActivity;
8 * Created by Piotr Ostrowski on 13.06.2018.
10 public abstract class PresenterActivity<P extends Presenter> extends AbstractActivity {
14 protected abstract P createPresenter();
16 protected P getPresenter() {
21 public void onCreate(Bundle savedInstanceState) {
22 super.onCreate(savedInstanceState);
23 presenter = createPresenter();
24 presenter.onCreate(savedInstanceState);
28 public void onStart() {
34 public void onStop() {
40 public void onResume() {
46 public void onPause() {
52 public void onDestroy() {
54 presenter.onDestroy();
58 public void onSaveInstanceState(Bundle outState) {
59 super.onSaveInstanceState(outState);
60 presenter.onSaveInstanceState(outState);