The above example works properly, because release 1.0-rc4 fixed the issue of needing the unnecessary variable.
An other interesting thing on this is that you can pas variables to the imported layout from the binder like this:
MainBinding binding = MainBinding.inflate(getLayoutInflater()); binding.buttons.setVariable(BR.varID, variable)