I am trying learn View-model android ,in my first phase of learning i am trying to update UI (Textview) by using view-model and data-binding. In View model i am having aynctask
You'll require to notify observer when you set value like this :
public class UserData extends BaseObservable{
private String firstName ;
@Bindable
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
notifyPropertyChanged(BR.firstName) // call like this
}
}