Builder

class Builder<T : Any>(lifecycleOwner: LifecycleOwner, value: T)

Builder class for creating LifecycleAwareProperty.

Constructors

Builder
Link copied to clipboard
fun <T : Any> Builder(lifecycleOwner: LifecycleOwner, value: T)

Functions

build
Link copied to clipboard
fun build(): LifecycleAwareProperty<T>
returns a new instance of LifecycleAwareProperty.
on
Link copied to clipboard
fun on(on: On, receiver: T.() -> Unit): LifecycleAwareProperty.Builder<T>
observes on the On lifecycle state.
onAny
Link copied to clipboard
fun onAny(receiver: T.() -> Unit): LifecycleAwareProperty.Builder<T>
observes on the On.ANY lifecycle state.
onCreate
Link copied to clipboard
fun onCreate(receiver: T.() -> Unit): LifecycleAwareProperty.Builder<T>
observes on the On.CREATE lifecycle state.
onDestroy
Link copied to clipboard
fun onDestroy(receiver: T.() -> Unit): LifecycleAwareProperty.Builder<T>
observes on the On.DESTROY lifecycle state.
onPause
Link copied to clipboard
fun onPause(receiver: T.() -> Unit): LifecycleAwareProperty.Builder<T>
observes on the On.PAUSE lifecycle state.
onResume
Link copied to clipboard
fun onResume(receiver: T.() -> Unit): LifecycleAwareProperty.Builder<T>
observes on the On.RESUME lifecycle state.
onStart
Link copied to clipboard
fun onStart(receiver: T.() -> Unit): LifecycleAwareProperty.Builder<T>
observes on the On.START lifecycle state.
onStop
Link copied to clipboard
fun onStop(receiver: T.() -> Unit): LifecycleAwareProperty.Builder<T>
observes on the On.STOP lifecycle state.