Lifecycle.Event

public static final enum Lifecycle.Event
extends Enum<Lifecycle.Event>

java.lang.Object
   ↳ java.lang.Enum<androidx.lifecycle.Lifecycle.Event>
     ↳ androidx.lifecycle.Lifecycle.Event


Summary

Enum values

Lifecycle.Event  ON_ANY

An Event constant that can be used to match all events. 

Lifecycle.Event  ON_CREATE

Constant for onCreate event of the LifecycleOwner

Lifecycle.Event  ON_DESTROY

Constant for onDestroy event of the LifecycleOwner

Lifecycle.Event  ON_PAUSE

Constant for onPause event of the LifecycleOwner

Lifecycle.Event  ON_RESUME

Constant for onResume event of the LifecycleOwner

Lifecycle.Event  ON_START

Constant for onStart event of the LifecycleOwner

Lifecycle.Event  ON_STOP

Constant for onStop event of the LifecycleOwner

Public methods

static Lifecycle.Event downFrom(Lifecycle.State state)

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.

static Lifecycle.Event downTo(Lifecycle.State state)

Returns the Lifecycle.Event that will be reported by a Lifecycle entering the specified Lifecycle.State from a higher state, or null if there is no valid event that can move down to the given state.

Lifecycle.State getTargetState()

Returns the new Lifecycle.State of a Lifecycle that just reported this Lifecycle.Event.

static Lifecycle.Event upFrom(Lifecycle.State state)

Returns the Lifecycle.Event that will be reported by a Lifecycle leaving the specified Lifecycle.State to a higher state, or null if there is no valid event that can move up from the given state.

static Lifecycle.Event upTo(Lifecycle.State state)

Returns the Lifecycle.Event that will be reported by a Lifecycle entering the specified Lifecycle.State from a lower state, or null if there is no valid event that can move up to the given state.

static Lifecycle.Event valueOf(String name)
static final Event[] values()

Inherited methods

Enum values

ON_ANY

public static final Lifecycle.Event ON_ANY

An Event constant that can be used to match all events.

ON_CREATE

public static final Lifecycle.Event ON_CREATE

Constant for onCreate event of the LifecycleOwner.

ON_DESTROY

public static final Lifecycle.Event ON_DESTROY