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 voidonCreate(T lifeCycleSource)Notifies thatON_CREATEevent occurred.default voidonDestroy(T lifeCycleSource)Notifies thatON_DESTROYevent occurred.default voidonPause(T lifeCycleSource)Notifies thatON_PAUSEevent occurred.default voidonResume(T lifeCycleSource)Notifies thatON_RESUMEevent occurred.default voidonStart(T lifeCycleSource)Notifies thatON_STARTevent occurred.default voidonStop(T lifeCycleSource)Notifies thatON_STOPevent occurred.
-
-
-
Method Detail
-
onCreate
default void onCreate(@Nonnull T lifeCycleSource)
Notifies thatON_CREATEevent occurred.This method will be called after the LifecycleProvider's
onCreatemethod returns.- Parameters:
lifeCycleSource- the native object generating the lifecycle events
-
onStart
default void onStart(@Nonnull T lifeCycleSource)
Notifies thatON_STARTevent occurred.This method will be called after the LifecycleProvider's
onStartmethod returns.- Parameters:
lifeCycleSource- the native object generating the lifecycle events
-
onResume
default void onResume(@Nonnull T lifeCycleSource)
Notifies thatON_RESUMEevent occurred.This method will be called after the LifecycleProvider's
onResumemethod returns.- Parameters:
lifeCycleSource- the native object generating the lifecycle events
-
onPause
default void onPause(@Nonnull T lifeCycleSource)
Notifies thatON_PAUSEevent occurred.This method will be called before the LifecycleProvider's
onPausemethod is called.- Parameters:
lifeCycleSource- the native object generating the lifecycle events
-
onStop
default void onStop(@Nonnull T lifeCycleSource)
Notifies thatON_STOPevent occurred.This method will be called before the LifecycleProvider's
onStopmethod is called.- Parameters:
lifeCycleSource- the native object generating the lifecycle events
-
-