android-livedata
Android Room : LiveData callback of update insert?
Can i use LiveData to wrap Delete, Insert, Update calls? No, you can’t. I wrote an answer to the issue. The reason is, that LiveData is used to notify for changes. Insert, Update, Delete won’t trigger a change. It will return the deleted rows, the inserted ID or the affected rows. Even if it looks … Read more
Refreshing MutableLiveData of list of items
I think the extension is a bit nicer. operator fun <T> MutableLiveData<ArrayList<T>>.plusAssign(values: List<T>) { val value = this.value ?: arrayListOf() value.addAll(values) this.value = value } Usage: list += anotherList;
Kotlin Flow vs LiveData
Flow is sort of a reactive stream ( like rxjava ). There are a bunch of different operators like .map, buffer() ( anyway less no. Of operator compared to rxJava ). So, one of the main difference between LiveData and Flow is that u can subscribe the map computation / transformation in some other thread … Read more