lazybones / com.skydoves.lazybones / LifecycleAwareProperty

LifecycleAwareProperty

class LifecycleAwareProperty<T>

LifecycleAwareProperty is an observer for notifying lifecycle is changed.

Constructors

<init>

LifecycleAwareProperty(lifecycleOwner: LifecycleOwner, value: T)

LifecycleAwareProperty is an observer for notifying lifecycle is changed.

Properties

value

var value: T

Functions

observeOn

fun observeOn(on: On, receiver: (T) -> Unit): LifecycleAwareProperty<T>

observes on the On lifecycle state.

observeOnAny

fun observeOnAny(receiver: (T) -> Unit): LifecycleAwareProperty<T>

observes on the On.ANY lifecycle state.

observeOnCreate

fun observeOnCreate(receiver: (T) -> Unit): LifecycleAwareProperty<T>

observes on the On.CREATE lifecycle state.

observeOnDestroy

fun observeOnDestroy(receiver: (T) -> Unit): LifecycleAwareProperty<T>

observes on the On.DESTROY lifecycle state.

observeOnPause

fun observeOnPause(receiver: (T) -> Unit): LifecycleAwareProperty<T>

observes on the On.PAUSE lifecycle state.

observeOnResume

fun observeOnResume(receiver: (T) -> Unit): LifecycleAwareProperty<T>

observes on the On.RESUME lifecycle state.

observeOnStart

fun observeOnStart(receiver: (T) -> Unit): LifecycleAwareProperty<T>

observes on the On.START lifecycle state.

observeOnStop

fun observeOnStop(receiver: (T) -> Unit): LifecycleAwareProperty<T>

observes on the On.STOP lifecycle state.