Skip to content

为什么我的User类集成了BaseObservable,里面写了@Bindable没有生成BR #2

Description

@bethinner

public class User extends BaseObservable{
private String firstName;
private String 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);
}
@Bindable
public String getTotalName() {
    return this.firstName  + this.lastName;
}

}

BR,用不了

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions