@Target(value=METHOD)
public @interface BindingAdapter
@BindingAdapter("android:bufferType")
 public static void setBufferType(TextView view, TextView.BufferType bufferType) {
     view.setText(view.getText(), bufferType);
 }
 In the above example, when android:bufferType is used on a TextView, the method
 setBufferType is called.
 It is also possible to take previously set values, if the old values are listed first:
@BindingAdapter("android:onLayoutChange")
 public static void setOnLayoutChangeListener(View view, View.OnLayoutChangeListener oldValue,
                                              View.OnLayoutChangeListener newValue) {
     if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
         if (oldValue != null) {
             view.removeOnLayoutChangeListener(oldValue);
         }
         if (newValue != null) {
             view.addOnLayoutChangeListener(newValue);
         }
     }
 }
 When a binding adapter may also take multiple attributes, it will only be called when all
 attributes associated with the binding adapter have binding expressions associated with them.
 This is useful when there are unusual interactions between attributes. For example:
 
@BindingAdapter({"android:onClick", "android:clickable"})
 public static void setOnClick(View view, View.OnClickListener clickListener,
                               boolean clickable) {
     view.setOnClickListener(clickListener);
     view.setClickable(clickable);
 }
 The order of the parameters must match the order of the attributes in values in the
 BindingAdapter.
 
 A binding adapter may optionally take a class extending DataBindingComponent as the first
 parameter as well. If it does, it will be passed the value passed in during binding, either
 directly in the inflate method or indirectly, using the value from
 DataBindingUtil.getDefaultComponent().
 
If a binding adapter is an instance method, the generated DataBindingComponent will have a getter to retrieve an instance of the BindingAdapter's class to use to call the method.
| Modifier and Type | Required Element and Description | 
|---|---|
| java.lang.String[] | value | 
| Modifier and Type | Optional Element and Description | 
|---|---|
| boolean | requireAllWhether every attribute must be assigned a binding expression or if some
 can be absent. | 
public abstract java.lang.String[] value
public abstract boolean requireAll