BaseLiveData

abstract class BaseLiveData<T, I : BaseLiveData.Impl<T>> : LiveData<T>

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
abstract class Impl<T>

Functions

Link copied to clipboard
abstract fun createImpl(): I
Link copied to clipboard

Flattens a LiveData of LiveData into a LiveData of the inner type.

Link copied to clipboard
abstract fun getValue(): T

Returns the current value with no observation.

Link copied to clipboard
fun <S, T> LiveData<T>.map(transformT: (T) -> S): LiveData<S>

Maps the value of the LiveData to a new value using the provided transformation function.

Link copied to clipboard
override fun observe(observer: Observer<T>): Observation

fun observe(lifecycleOwner: LifecycleOwner, closure: (T) -> Unit): ObservationWeakReference

Observe the data for as long as the given lifecycleOwner is in memory or until the returned observation is cancelled.

Link copied to clipboard
infix fun <S, T> LiveData<S>.zipWith(liveData: LiveData<T>): LiveData<Pair<S, T>>