I been trying to control the visibility of a view using the Implicit Attribute Listeners(reference) in android data binding which allows to access views by id and access at
As you use View.VISIBLE / View.GONE in your .xml file, you should import the View type by doing adding in the data section like the following:
View.VISIBLE
View.GONE
View