Skip to content

Instantly share code, notes, and snippets.

@e10dokup
Created December 23, 2015 15:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save e10dokup/3c45feab02a7c85d66a6 to your computer and use it in GitHub Desktop.
Save e10dokup/3c45feab02a7c85d66a6 to your computer and use it in GitHub Desktop.
User.java
public class User extends BaseObservable{
private static final String TAG = User.class.getSimpleName();
private final User self = this;
private String mFirstName;
private String mLastName;
public User(String firstName, String lastName) {
mFirstName = firstName;
mLastName = lastName;
}
@Bindable
public String getFirstName() {
return mFirstName;
}
public void setFirstName(String firstName) {
mFirstName = firstName;
notifyPropertyChanged(BR.firstName);
}
@Bindable
public String getLastName() {
return mLastName;
}
public void setLastName(String lastName) {
mLastName = lastName;
notifyPropertyChanged(BR.lastName);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment