So I have a view:
<include
android:id="@+id/root"
layout="@layout/layout_awesome"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:isVisible="@{viewModel.itemA != null}" />
But in my case, root view visibility should be determined based on two model values in my viewmodel, so I would like to achieve something like this:
<include
android:id="@+id/root"
layout="@layout/layout_awesome"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:isVisible="@{viewModel.itemA != null && viewModel.itemB == null}" />
However, this does not work. Is there an issue with the syntax? I could not find an example where operators are used.