public abstract class BasePresenterFragment<P extends Presenter>
extends Fragment
| Constructor and Description |
|---|
BasePresenterFragment() |
| Modifier and Type | Method and Description |
|---|---|
void |
destroyPresenter()
Forces the destruction of a presenter :
- presenter will be notified of their destruction with
Presenter#detachView() first then Presenter#destroy() |
P |
getPresenter() |
protected PresenterCache |
getPresenterCache()
Gets the presenter cache.
|
protected abstract void |
injectFragment()
Injects the fragment using the a component.
|
protected abstract P |
instantiatePresenter()
This method should return a Presenter instance which will be used for the current view.
|
void |
onCreate(android.os.Bundle savedInstanceState) |
void |
onDestroy() |
void |
onPause() |
void |
onResume() |
void |
onSaveInstanceState(android.os.Bundle outState) |
void |
setPresenterCache(PresenterCache presenterCache)
Injects the presenter cache when child class will inject the activity using
injectFragment() ()}. |
public void onCreate(android.os.Bundle savedInstanceState)
public void onSaveInstanceState(android.os.Bundle outState)
public void onResume()
public void onPause()
public void onDestroy()
public P getPresenter()
public void destroyPresenter()
Presenter#detachView() first then Presenter#destroy().
- presenter will be removed from the cachepublic void setPresenterCache(PresenterCache presenterCache)
injectFragment() ()}.presenterCache - Presenter cache injected.protected PresenterCache getPresenterCache()
protected abstract void injectFragment()
protected abstract P instantiatePresenter()