Chethan
04/07/2021, 9:22 AM@Keep
class UserValues : BaseObservable() {
var totalTip = MutableLiveData<Int>(0)
@Bindable
var enteredAmount: String = "0"
set(value) {
field = value
notifyPropertyChanged(BR.enteredAmount)
}
@Bindable
var numberOfPeople: String = "0"
set(value) {
field = value
notifyPropertyChanged(BR.numberOfPeople)
}
@Bindable
var tipInPercentage: String = "0"
set(value) {
field = value
notifyPropertyChanged(BR.tipInPercentage)
}
}
How can I listen to change in any of the input , so that I have to make final result on the view model ??