LiveData

open class LiveData<T>
open class LiveData<T>(initialValue: T)

Functions

addObserver
Link copied to clipboard
common
fun addObserver(observer: (T) -> Unit)
equals
Link copied to clipboard
open operator fun equals(other: Any?): Boolean
open operator fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
open fun hashCode(): Int
open fun hashCode(): Int
removeObserver
Link copied to clipboard
common
fun removeObserver(observer: (T) -> Unit)
toString
Link copied to clipboard
open fun toString(): String
open fun toString(): String

Properties

value
Link copied to clipboard
open val value: T

Inheritors

MutableLiveData
Link copied to clipboard

Extensions

asFlow
Link copied to clipboard
common
fun <T> LiveData<T>.asFlow(): Flow<T>
bind
Link copied to clipboard
fun <T> LiveData<T>.bind(lifecycleOwner: LifecycleOwner, observer: (T?) -> Unit)
fun <T, V : Any> LiveData<T>.bind(view: V, setter: V.(T) -> Unit)
bindNotNull
Link copied to clipboard
fun <T> LiveData<T>.bindNotNull(lifecycleOwner: LifecycleOwner, observer: (T) -> Unit)
bindToButtonImage
Link copied to clipboard
ios
fun LiveData<Boolean>.bindToButtonImage(button: <ERROR CLASS>, trueImage: <ERROR CLASS>, falseImage: <ERROR CLASS>)
bindToButtonTitle
Link copied to clipboard
ios
fun LiveData<String>.bindToButtonTitle(button: <ERROR CLASS>)
fun LiveData<<ERROR CLASS>>.bindToButtonTitle(button: <ERROR CLASS>)
bindToCheckBoxChecked
Link copied to clipboard
fun LiveData<Boolean>.bindToCheckBoxChecked(lifecycleOwner: LifecycleOwner, checkBox: CheckBox)
bindToControlEnabled
Link copied to clipboard
ios
fun LiveData<Boolean>.bindToControlEnabled(control: <ERROR CLASS>)
bindToLabelText
Link copied to clipboard
ios
fun LiveData<String>.bindToLabelText(label: <ERROR CLASS>)
fun LiveData<<ERROR CLASS>>.bindToLabelText(label: <ERROR CLASS>)
bindToResponderFocus
Link copied to clipboard
ios
fun LiveData<Boolean>.bindToResponderFocus(responder: <ERROR CLASS>)
bindToSwitchOn
Link copied to clipboard
ios
fun LiveData<Boolean>.bindToSwitchOn(switch: <ERROR CLASS>)
bindToTextFieldText
Link copied to clipboard
ios
fun LiveData<String>.bindToTextFieldText(textField: <ERROR CLASS>)
fun LiveData<<ERROR CLASS>>.bindToTextFieldText(textField: <ERROR CLASS>)
bindToTextViewText
Link copied to clipboard
@JvmName(name = "bindToTextViewTextString")
fun LiveData<String>.bindToTextViewText(lifecycleOwner: LifecycleOwner, textView: TextView)
@JvmName(name = "bindToTextViewTextStringDesc")
fun LiveData<StringDesc>.bindToTextViewText(lifecycleOwner: LifecycleOwner, textView: TextView)
fun LiveData<String>.bindToTextViewText(textView: <ERROR CLASS>)
fun LiveData<<ERROR CLASS>>.bindToTextViewText(textView: <ERROR CLASS>)
bindToViewBackgroundColor
Link copied to clipboard
ios
fun LiveData<Boolean>.bindToViewBackgroundColor(view: <ERROR CLASS>, trueColor: <ERROR CLASS>, falseColor: <ERROR CLASS>)
bindToViewEnabled
Link copied to clipboard
fun LiveData<Boolean>.bindToViewEnabled(lifecycleOwner: LifecycleOwner, view: View)
bindToViewHidden
Link copied to clipboard
ios
fun LiveData<Boolean>.bindToViewHidden(view: <ERROR CLASS>)
bindToViewVisibleOrGone
Link copied to clipboard
fun LiveData<Boolean>.bindToViewVisibleOrGone(lifecycleOwner: LifecycleOwner, view: View)
bindToViewVisibleOrInvisible
Link copied to clipboard
fun LiveData<Boolean>.bindToViewVisibleOrInvisible(lifecycleOwner: LifecycleOwner, view: View)
debounce
Link copied to clipboard
common
fun <T> LiveData<T>.debounce(coroutineScope: CoroutineScope, timeInMillis: Long): LiveData<T>
distinct
Link copied to clipboard
common
fun <T> LiveData<T>.distinct(): LiveData<T>
flatMap
Link copied to clipboard
common
fun <T, OT> LiveData<T>.flatMap(function: (T) -> LiveData<OT>): LiveData<OT>
flatMapBuffered
Link copied to clipboard
common
fun <T, OT> LiveData<T>.flatMapBuffered(function: (T, T) -> LiveData<OT>): LiveData<OT>
map
Link copied to clipboard
common
fun <T, OT> LiveData<T>.map(function: (T) -> OT): LiveData<OT>
mapBuffered
Link copied to clipboard
common
fun <T, OT> LiveData<T>.mapBuffered(function: (T, T) -> OT): LiveData<OT>
mapOrNull
Link copied to clipboard
common
fun <IT, OT> LiveData<IT?>.mapOrNull(function: (IT) -> OT): LiveData<OT?>
mapToString
Link copied to clipboard
@JvmName(name = "mapToStringStringDesc")
fun LiveData<StringDesc>.mapToString(context: Context): LiveData<String>
@JvmName(name = "mapToStringStringDescOptional")
fun LiveData<StringDesc?>.mapToString(context: Context): LiveData<String?>
mapTrueOrNull
Link copied to clipboard
common
fun <OT> LiveData<Boolean?>.mapTrueOrNull(function: () -> OT): LiveData<OT?>
mergeWith
Link copied to clipboard
common
fun <OT, I1T, I2T> LiveData<I1T>.mergeWith(secondLiveData: LiveData<I2T>, function: (I1T, I2T) -> OT): MediatorLiveData<OT>
not
Link copied to clipboard
common
fun LiveData<Boolean>.not(): LiveData<Boolean>
orEmpty
Link copied to clipboard
common
fun LiveData<String?>.orEmpty(): LiveData<String>
@JvmName(name = "ListLiveDataOrEmpty")
fun <T> LiveData<List<T>?>.orEmpty(): LiveData<List<T>>
required
Link copied to clipboard
common
fun <T> LiveData<T?>.required(initialValue: T): LiveData<T>
revert
Link copied to clipboard
common
fun LiveData<Boolean>.revert(): LiveData<Boolean>
throwableMessage
Link copied to clipboard
common
fun <T : Throwable> LiveData<T>.throwableMessage(mapper: (Throwable) -> String = { it.message.orEmpty() }): LiveData<String>