Android databinding: set default visibility in xml
问题 I show items in recyclerview and use databinding . In xml layout I has such view: <include android:visibility="@{viewmodel.expandable ? View.VISIBLE : View.GONE}" bind:viewmodel="@{viewmodel}" layout="@layout/full_station_layout"/> It works well but I has one issue: while recyclerview initializing and bind items to views this layout flashes once on the screen although initial value viewmodel.expandable is false. So, I decided temporary hide this layout and tried using default -parameter in