Package-level declarations

Types

Link copied to clipboard
abstract class BaseLiveData<T, I : BaseLiveData.Impl<T>> : LiveData<T>
Link copied to clipboard
class ChangingLiveData<T>(interval: Long, timeUnit: TimeUnit, source: () -> T) : LiveData<T>
Link copied to clipboard
class FixedLiveData<T>(instance: T) : LiveData<T>
Link copied to clipboard
interface LifecycleOwner

A lifecycle owner is an object that can hold a strong reference to an Observation and provide a ObservationWeakReference to it.

Link copied to clipboard
Link copied to clipboard
abstract class LiveData<out T>

A lifecycle-aware observable that sends only new updates after subscription.

Link copied to clipboard
class MutableLiveData<T>(instance: T) : LiveData<T>

A LiveData that can be mutated.

Link copied to clipboard
interface Observation

Represents an observation that can be cancelled.

Link copied to clipboard

Represents an observation that can be cancelled but only holds a weak reference to the observer.

Link copied to clipboard
interface Observer<in T>

Represents an observer that can be notified of changes.

Functions

Link copied to clipboard
Link copied to clipboard

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

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

fun <K, T> Map<K, LiveData<T>>.flatten(): LiveData<Map<K, T>>

Flattens Map<K, LiveData<T>> into LiveData<Map<K, T>>

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
infix fun <S, T> LiveData<S>.zipWith(liveData: LiveData<T>): LiveData<Pair<S, T>>