Top "Android-livedata" questions

Android LiveData holds the value and allow it to observe changes and also respects lifecycle of the app components.

Why there's a separate MutableLiveData subclass of LiveData?

It looks like MutableLiveData differs from LiveData only by making the setValue() and postValue() methods public, whereas in LiveData they …

android oop android-architecture-components android-livedata
Error:Program type already present: android.arch.lifecycle.LiveData

When I press the run button in Android Studio, my app compiles but shows this error (redacted): Error:Program type …

android android-studio android-gradle-plugin android-livedata
update RecyclerView with Android LiveData

There are many examples how to push new list to adapter on LiveData change. I'm trying to update one row (…

android android-recyclerview android-livedata
LiveData prevent receive the last value when start observing

Is it possible to prevent LiveData receive the last value when start observing? I am considering to use LiveData as …

android android-livedata android-architecture-components android-viewmodel mutablelivedata
Refreshing MutableLiveData of list of items

I'm using LiveData and ViewModel from the architecture components in my app. I have a list of items that is …

android android-architecture-components android-livedata
What is difference between MediatorLiveData and MutableLiveData in MVVM

I have searched a lot but not found the crystal clear answer for the questions: What is the difference between …

android android-livedata android-architecture
What is the difference between map() and switchMap() methods?

What is the difference between those 2 methods of the LiveData class? The official doc and tutorial are pretty vague on …

android android-architecture-components android-livedata
MutableLiveData: Cannot invoke setValue on a background thread from Coroutine

I'm trying to trigger an update on LiveData from a coroutine: object AddressList: MutableLiveData<List<Address>>() …

kotlin android-livedata kotlin-coroutines
How to combine two live data one after the other?

I have next use case: User comes to registration form, enters name, email and password and clicks on register button. …

android observer-pattern android-room android-architecture-components android-livedata
Android LiveData - how to reuse the same ViewModel on different activities?

Example ViewModel: public class NameViewModel extends ViewModel { // Create a LiveData with a String private MutableLiveData<String> mCurrentName; public …

java android android-livedata