Does anyone know how to intercept `MutableLiveData...
# android
l
Does anyone know how to intercept `MutableLiveData`'s
setValue(T)
and
postValue(T)
to log the new value, for example? Do I need to implement a Delegate? I have a standard
ViewModel
setup with
MutableLiveData
and
LiveData
and would like to log (within the
ViewModel
itself) every time the value changes.
stackoverflow 3
Stackoverflow was a good advice: Got my answer within an hour: https://stackoverflow.com/questions/53804217/reacting-to-livedata-change-within-same-viewmodel
👍 1