android databinding using “&&” logical operator

&& should be rendered as &&.

The official data binding guide has examples of comparison operators where these XML entities are used, for example

android:visibility="@{age < 13 ? View.GONE : View.VISIBLE}"

Edit

The example expressions I mentioned in the answer disappeared from the English version of the docs since this answer was written. They do survive in some outdated non-English versions of the docs such as the Spanish version.

Either way, the original answer is still valid, because the use of XML entities in XML is standard in XML and has nothing to do with Android itself.

Leave a Comment