Databinding使用在XML中使用&&

前端之家收集整理的这篇文章主要介绍了Databinding使用在XML中使用&&前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

http://stackoverflow.com/questions/37152824/android-databinding-using-logical-operator
@H_404_2@


@H_404_2@

My guess is that you should render&&as&&.@H_404_2@

The officialdata binding guidehas examples of comparison operators where these XML entities are used,for example@H_404_2@

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

也就是注意要使用“转义符号”。@H_404_2@

比如说大于号,小于号等等,都需要转义符号。@H_404_2@

猜你在找的XML相关文章