Package androidx.databinding
Annotation Type Bindable
-
@Target({FIELD,METHOD}) @Retention(RUNTIME) public @interface BindableThe Bindable annotation should be applied to any getter accessor method of anObservableclass. Bindable will generate a field in the BR class to identify the field that has changed.When applied to an accessor method, the Bindable annotation takes an optional list of property names that it depends on. If there is a change notification of any of the listed properties, this value will also be considered dirty and be refreshed. For example:
@Bindable public void getFirstName() { return this.firstName; } @Bindable public void getLastName() { return this.lastName; } @Bindable({"firstName", "lastName"}} public void getName() { return this.firstName + ' ' + this.lastName; }Whenever either
firstNameorlastNamehas a change notification,namewill also be considered dirty. This does not mean thatObservable.OnPropertyChangedCallback.onPropertyChanged(Observable, int)will be notified forBR.name, only that binding expressions containingnamewill be dirtied and refreshed.
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description java.lang.String[]value
-