I show items in recyclerview and use databinding. In xml layout I has such view:
Check if you have already imported the View class.
<data>
<import type="android.view.View"/>
<variable ..... />
</data>
Also, the default correct syntax for default value for visibility is default=gone
, no default=View.GONE
You can set gone
, visible
, invisible
in default
property. Replace with below.
<include
android:visibility="@{viewmodel.expandable ? View.VISIBLE : View.GONE, default=gone}"
bind:viewmodel="@{viewmodel}"
layout="@layout/full_station_layout"/>