How can we use data binding in android to put image resource in an ImageView
?
<ImageView
android:id="@+id/is_synced"
android:src="@{model.pending ? @mipmap/pending: @mipmap/synced}"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
I want an image if pending is true and another image if pending is false. But it's showing error.How can I achieve this functionality?