I am trying to show and hide an element based on a boolean. In my xml I have the following:
android:visibility="@{viewModel.interfaceEnable ? visible : gone}"
viewModel.interfaceEnable
is an ObservableField as as such: var interfaceEnable = ObservableField<Boolean>()
. And visible
and gone
are values for the android:visibility
attribute. But I am getting this error:
****/ data binding error ****msg:Identifiers must have user defined types from the XML file. visibile is missing it
Why is this attribute not settable this method?