content: package com.yl.databindingdemo.bean;
  
  import android.databinding.BaseObservable;
  import android.databinding.Bindable;
  
  import com.android.databinding.library.baseAdapters.BR;
  
  /**
   * Created by yangle on 2017/7/18.
   */
  
  public class ObservableObjectsUser extends BaseObservable {
  
      private String firstName;
      private String lastName;
  
      public ObservableObjectsUser() {
      }
  
      public ObservableObjectsUser(String firstName, String lastName) {
          this.firstName = firstName;
          this.lastName = lastName;
      }
  
      @Bindable
      public String getFirstName() {
          return firstName;
      }
  
      public void setFirstName(String firstName) {
          this.firstName = firstName;
          notifyPropertyChanged(BR.firstName);
      }
  
      @Bindable
      public String getLastName() {
          return lastName;
      }
  
      public void setLastName(String lastName) {
          this.lastName = lastName;
          notifyPropertyChanged(BR.lastName);
      }
  
      @Override
      public String toString() {
          return "User{" +
                  "firstName='" + firstName + '\'' +
                  ", lastName='" + lastName + '\'' +
                  '}';
      }
  }
  