| Constructor and Description |
|---|
BasePresenter() |
| Modifier and Type | Method and Description |
|---|---|
void |
attachView(V view)
Set or attach the view to this presenter
|
void |
detachView()
Will be called if the view has been destroyed.
|
V |
getView()
Get the attached view.
|
boolean |
isViewAttached()
Checks if a view is attached to this presenter.
|
public void attachView(V view)
PresenterattachView in interface Presenter<V extends UiView>public boolean isViewAttached()
getView() to get the view instance.public V getView()
isViewAttached() to check if
the view is attached to avoid NullPointerExceptions.null, if view is not attached, otherwise the concrete view instancepublic void detachView()
PresenterActivity.detachView() or Fragment.onDestroyView()detachView in interface Presenter<V extends UiView>