public interface ViewObserver
ViewObserver a listener interface for receiving lifecycle events
from a View. The interface is mainly intended to be used by an attached Presenter.
Typically Presenter implementation should not care about Views's lifecycle events,
but in some cases it is necessary.| Modifier and Type | Method and Description |
|---|---|
void |
onViewCreated(View view,
Params params)
Invoked by a
View implementation when it is created. |
void |
onViewDestroy(View view)
Invoked by a
View implementation when it is destroyed,
e.g. |
void |
onViewPause(View view)
Invoked by a
View implementation when it is paused,
e.g. |
void |
onViewResume(View view)
Invoked by a
View implementation when it is resumed,
e.g. |
void |
onViewStart(View view)
Invoked by a
View implementation when it is started,
e.g. |
void |
onViewStop(View view)
Invoked by a
View implementation when it is stopped,
e.g. |
void onViewCreated(View view, Params params)
View implementation when it is created.void onViewResume(View view)
View implementation when it is resumed,
e.g. on ViewCompatFragment#onResume().view - A Viewvoid onViewPause(View view)
View implementation when it is paused,
e.g. on ViewCompatFragment#onPause().view - A Viewvoid onViewStart(View view)
View implementation when it is started,
e.g. on ViewCompatFragment#onStart().view - A Viewvoid onViewStop(View view)
View implementation when it is stopped,
e.g. on ViewCompatFragment#onStop().view - A View