var productList = MutableLiveData<ArrayList<...
# android
g
var productList = MutableLiveData<ArrayList<Fnblist>>() fun add(subitem: Subitem, position: Int) { productList.value?.get(position)?.subitems?.get(0)?.count = 2 } not observing on property change.. need help
stackoverflow 1
1
When using setvalue it's observing in activity. But when changing feild in livedata not observing.
e
Because LiveData don’t know if the content of the object changed.
g
Then. What's solutions for this
e
add
productList.setValue(productList.value)
m
it only observes changes of the list, not the items within the list