I have a User data class as below and I need to use two-way data binding for the checkbox using the active variable.
- active == 1, check
- active == 0, uncheck
data class User( var name: String, var active: Int )
android:checked="@={viewModel.user.active == 1}"
I tried this and two-way data binding does not support this. How can I fix this?
Replace
TO