I have found some resources about how to implement AND
, less than
and greater than
operator in XML for Android data-binding.
&
-> &
<
-> <
>
-> >
However, how to add OR
operator? I cannot find the related information in Android official documentation.
I have visited these sites
StackOverflow --- android databinding using "&&" logical operator - Stack Overflow
StackOverflow --- android-databinding-using-logical-operator
Escape And(&&) Operator In Android Data Binding
My expected result:
<View
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="@{viewModel.fooBoolOne || viewModel.fooBoolTwo ? View.VISIBLE : View.GONE}"/>```