Last active
June 12, 2020 10:36
-
-
Save pranay1494/90d203e99e951e182e1fc16df593b827 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.expandablerecyclerview.data.nestedselect | |
import androidx.databinding.Observable | |
import androidx.databinding.ObservableField | |
data class SelectableEntity(var id: String = "", var itemName: String = "", var isSelected: Boolean = false) { | |
val selectableField = ObservableField(isSelected) | |
init { | |
selectableField.addOnPropertyChangedCallback(object : Observable.OnPropertyChangedCallback() { | |
override fun onPropertyChanged(sender: Observable?, propertyId: Int) { | |
isSelected = selectableField.get() ?: false | |
} | |
}) | |
} | |
data class ParentDescription(val id: String, val name: String) | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment