Hi Guys , what is the best way to design this use ...
# android
c
Hi Guys , what is the best way to design this use case , I have set of user input , whenever user changes one of the input , I should be able to listen to it for producing final output . I have this baseobservable class
Copy code
@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 ??