BindingViewModel

abstract class BindingViewModel : ViewModel, BindingObservable

Author

skydoves (Jaewoong Eum)

A ViewModel that provides a way in which UI can be notified of changes. We can register an observable property using androidx.databinding.Bindable annotation and bindingProperty delegates. The getter for an observable property should be annotated with androidx.databinding.Bindable.

Constructors

BindingViewModel
Link copied to clipboard
fun BindingViewModel()

Functions

addOnPropertyChangedCallback
Link copied to clipboard
open override fun addOnPropertyChangedCallback(callback: Observable.OnPropertyChangedCallback?)
Adds a new Observable.OnPropertyChangedCallback to the property registry.
clear
Link copied to clipboard
fun clear()
equals
Link copied to clipboard
open operator fun equals(other: Any?): Boolean
getTag
Link copied to clipboard
open fun <T : Any> getTag(p0: String): T
hashCode
Link copied to clipboard
open fun hashCode(): Int
notifyChanged
Link copied to clipboard
open override fun notifyChanged()
Notifies listeners that all properties of this instance have changed.
notifyPropertyChanged
Link copied to clipboard
open override fun notifyPropertyChanged(bindingId: Int)
Notifies a specific property has changed that matches in PropertyChangeRegistry.
open override fun notifyPropertyChanged(function: KFunction<*>)
Notifies a specific property has changed that matches in PropertyChangeRegistry.
open override fun notifyPropertyChanged(property: KProperty<*>)
Notifies a specific property has changed that matches in PropertyChangeRegistry.
removeOnPropertyChangedCallback
Link copied to clipboard
open override fun removeOnPropertyChangedCallback(callback: Observable.OnPropertyChangedCallback?)
Removes an old Observable.OnPropertyChangedCallback from the property registry.
setTagIfAbsent
Link copied to clipboard
open fun <T : Any> setTagIfAbsent(p0: String, p1: T): T
toString
Link copied to clipboard
open fun toString(): String