Event
class Event
kotlin.Any | ||
↳ | kotlin.Enum<androidx.lifecycle.Lifecycle.Event> | |
↳ | androidx.lifecycle.Lifecycle.Event |
Summary
Enum values | |
---|---|
An |
|
Constant for onCreate event of the |
|
Constant for onDestroy event of the |
|
Constant for onPause event of the |
|
Constant for onResume event of the |
|
Constant for onStart event of the |
|
Constant for onStop event of the |
Public methods | |
---|---|
static Lifecycle.Event? |
downFrom(@NonNull state: Lifecycle.State) Returns the |
static Lifecycle.Event? |
downTo(@NonNull state: Lifecycle.State) Returns the |
Lifecycle.State |
Returns the new |
static Lifecycle.Event? |
upFrom(@NonNull state: Lifecycle.State) Returns the |
static Lifecycle.Event? |
upTo(@NonNull state: Lifecycle.State) Returns the |
Enum values
ON_DESTROY
enum val ON_DESTROY : Lifecycle.Event
Constant for onDestroy event of the LifecycleOwner
.
Public methods
downFrom
@Nullable static fun downFrom(@NonNull state: Lifecycle.State): Lifecycle.Event?
Returns the Lifecycle.Event
that will be reported by a Lifecycle
leaving the specified Lifecycle.State
to a lower state, or null
if there is no valid event that can move down from the given state.
Parameters | |
---|---|
state |
Lifecycle.State: the higher state that the returned event will transition down from |
Return | |
---|---|
Lifecycle.Event? |
the event moving down the lifecycle phases from state |
downTo
@Nullable static fun downTo(@NonNull state: Lifecycle.State): Lifecycle.Event