I\'m trying to use databinding with custom views (a possible usage George Mount showed here).
One can\'t imagine building compound views without
There is no merge object after inflation, so there is nothing to assign values to with a merge tag. I can't think of any binding tag that will work on merge.
You can assign the tag to the root element and use the BindingAdapter to do what you want.
If you want to do something with the Binding class itself, you can use the DataBindingUtil to find the object from the View.
@BindingAdapter("isGone")
public static void setGone(View view, boolean isGone) {
ViewDataBinding binding = DataBindingUtil.findBinding(view);
//... do what you want with the binding.
}