V - The type of MvpViewP - The type of MvpPresenterpublic class FragmentMvpDelegateImpl<V extends MvpView,P extends <any>> extends java.lang.Object implements FragmentMvpDelegate<V,P>
FragmentMvpDelegate
Presenter is available (has view that is attached) in onViewCreated(View, Bundle) (after
super.onViewCreated() is called). View will be detached in onDestroyView() from presenter,
and eventually presenter will be destroyed in onDestroy().FragmentMvpDelegate| Modifier and Type | Field and Description |
|---|---|
static boolean |
DEBUG |
protected Fragment |
fragment |
protected boolean |
keepPresenterInstanceDuringScreenOrientationChanges |
protected boolean |
keepPresenterOnBackstack |
protected static java.lang.String |
KEY_MOSBY_VIEW_ID |
protected java.lang.String |
mosbyViewId |
| Constructor and Description |
|---|
FragmentMvpDelegateImpl(Fragment fragment,
MvpDelegateCallback<V,P> delegateCallback,
boolean keepPresenterDuringScreenOrientationChange,
boolean keepPresenterOnBackstack) |
| Modifier and Type | Method and Description |
|---|---|
void |
onActivityCreated(android.os.Bundle savedInstanceState)
Must be called from
Fragment#onActivityCreated(Bundle) |
void |
onAttach(android.app.Activity activity)
Must be called from
Fragment#onAttach(Activity) |
void |
onCreate(android.os.Bundle bundle)
Must be called from
Fragment#onCreate(Bundle) |
void |
onDestroy()
Must be called from
Fragment#onDestroy() |
void |
onDestroyView()
Must be called from
Fragment#onDestroyView() |
void |
onDetach()
Must be called from
Fragment#onDetach() |
void |
onPause()
Must be called from
Fragment#onPause() |
void |
onResume()
Must be called from
Fragment#onResume() |
void |
onSaveInstanceState(android.os.Bundle outState)
Must be called from
Fragment#onSaveInstanceState(Bundle) |
void |
onStart()
Must be called from
Fragment#onStart() |
void |
onStop()
Must be called from
Fragment#onStop() |
void |
onViewCreated(android.view.View view,
android.os.Bundle bundle)
Must be called from
Fragment#onViewCreated(View, Bundle) |
protected static final java.lang.String KEY_MOSBY_VIEW_ID
public static boolean DEBUG
protected Fragment fragment
protected final boolean keepPresenterInstanceDuringScreenOrientationChanges
protected final boolean keepPresenterOnBackstack
protected java.lang.String mosbyViewId
public FragmentMvpDelegateImpl(Fragment fragment,
MvpDelegateCallback<V,P> delegateCallback,
boolean keepPresenterDuringScreenOrientationChange,
boolean keepPresenterOnBackstack)
fragment - The FragmentdelegateCallback - the DelegateCallbackkeepPresenterDuringScreenOrientationChange - true, if the presenter should be kept during
screen orientation
changes. Otherwise, falsekeepPresenterOnBackstack - true, if the presenter should be kept when the fragment is
destroyed because it is put on the backstack, Otherwise falsepublic void onViewCreated(android.view.View view,
android.os.Bundle bundle)
FragmentMvpDelegateFragment#onViewCreated(View, Bundle)onViewCreated in interface FragmentMvpDelegate<V extends MvpView,P extends <any>>view - The inflated viewbundle - the bundle with the viewstatepublic void onDestroyView()
FragmentMvpDelegateFragment#onDestroyView()onDestroyView in interface FragmentMvpDelegate<V extends MvpView,P extends <any>>public void onPause()
FragmentMvpDelegateFragment#onPause()onPause in interface FragmentMvpDelegate<V extends MvpView,P extends <any>>public void onResume()
FragmentMvpDelegateFragment#onResume()onResume in interface FragmentMvpDelegate<V extends MvpView,P extends <any>>public void onStart()
FragmentMvpDelegateFragment#onStart()onStart in interface FragmentMvpDelegate<V extends MvpView,P extends <any>>public void onStop()
FragmentMvpDelegateFragment#onStop()onStop in interface FragmentMvpDelegate<V extends MvpView,P extends <any>>public void onActivityCreated(android.os.Bundle savedInstanceState)
FragmentMvpDelegateFragment#onActivityCreated(Bundle)onActivityCreated in interface FragmentMvpDelegate<V extends MvpView,P extends <any>>savedInstanceState - The saved bundlepublic void onAttach(android.app.Activity activity)
FragmentMvpDelegateFragment#onAttach(Activity)onAttach in interface FragmentMvpDelegate<V extends MvpView,P extends <any>>activity - The activity the fragment is attached topublic void onDetach()
FragmentMvpDelegateFragment#onDetach()onDetach in interface FragmentMvpDelegate<V extends MvpView,P extends <any>>public void onSaveInstanceState(android.os.Bundle outState)
FragmentMvpDelegateFragment#onSaveInstanceState(Bundle)onSaveInstanceState in interface FragmentMvpDelegate<V extends MvpView,P extends <any>>public void onCreate(android.os.Bundle bundle)
FragmentMvpDelegateFragment#onCreate(Bundle)onCreate in interface FragmentMvpDelegate<V extends MvpView,P extends <any>>bundle - The bundlepublic void onDestroy()
FragmentMvpDelegateFragment#onDestroy()onDestroy in interface FragmentMvpDelegate<V extends MvpView,P extends <any>>