SyntaxFix
Write A Post
Hire A Developer
Questions
When using Data Binding you can do something like this:
android:backgroundTint="@{item.selected ? @color/selected : @color/unselected}"
I have made a very simple example