Save the date! Android Dev Summit is coming to Sunnyvale, CA on Oct 23-24, 2019.

State

class State
kotlin.Any
   ↳ kotlin.Enum<androidx.lifecycle.Lifecycle.State>
   ↳ androidx.lifecycle.Lifecycle.State

Lifecycle states. You can consider the states as the nodes in a graph and Events as the edges between these nodes.

Summary

Public methods
Boolean
isAtLeast(@NonNull state: Lifecycle.State)

Compares if this State is greater or equal to the given state.

Enum values

DESTROYED

DESTROYED

INITIALIZED

INITIALIZED

CREATED

CREATED

STARTED

STARTED

RESUMED

RESUMED

Public methods

isAtLeast

fun isAtLeast(@NonNull state: Lifecycle.State): Boolean

Compares if this State is greater or equal to the given state.

Parameters
state Lifecycle.State: State to compare with
Return
Boolean: true if this State is greater or equal to the given state