Package io.nevernull.mobileui.lifecycle
Interface LifecycleAware<T>
-
public interface LifecycleAware<T>
Callback interface for listening to component-lifecycle state changes.- Since:
- 0.2.0
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default void
onCreate(T lifeCycleSource)
Notifies thatON_CREATE
event occurred.default void
onDestroy(T lifeCycleSource)
Notifies thatON_DESTROY
event occurred.default void
onPause(T lifeCycleSource)
Notifies thatON_PAUSE
event occurred.default void
onResume(T lifeCycleSource)
Notifies thatON_RESUME
event occurred.default void
onStart(T lifeCycleSource)
Notifies thatON_START
event occurred.default void
onStop(T lifeCycleSource)
Notifies thatON_STOP
event occurred.
-
-
-
Method Detail
-
onCreate
default void onCreate(@Nonnull T lifeCycleSource)
Notifies thatON_CREATE
event occurred.This method will be called after the LifecycleProvider's
onCreate
method returns.- Parameters:
lifeCycleSource
- the native object generating the lifecycle events
-
onStart
default void onStart(@Nonnull T lifeCycleSource)
Notifies thatON_START
event occurred.This method will be called after the LifecycleProvider's
onStart
method returns.- Parameters:
lifeCycleSource
- the native object generating the lifecycle events
-
onResume
default void onResume(@Nonnull T lifeCycleSource)
Notifies thatON_RESUME
event occurred.This method will be called after the LifecycleProvider's
onResume
method returns.- Parameters:
lifeCycleSource
- the native object generating the lifecycle events
-
onPause
default void onPause(@Nonnull T lifeCycleSource)
Notifies thatON_PAUSE
event occurred.This method will be called before the LifecycleProvider's
onPause
method is called.- Parameters:
lifeCycleSource
- the native object generating the lifecycle events
-
onStop
default void onStop(@Nonnull T lifeCycleSource)
Notifies thatON_STOP
event occurred.This method will be called before the LifecycleProvider's
onStop
method is called.- Parameters:
lifeCycleSource
- the native object generating the lifecycle events
-
-