Top "Android-mvvm" questions

Questions regarding applying a Model-View-ViewModel in android application

Using LiveData with Data Binding

With the stabilization of Android Architecture Components I started updating all my basic ViewModels to the new implementation ofViewModel. In …

android kotlin android-databinding android-architecture-components android-mvvm
LiveData Object keeps being null after getValue() is called

I want to update a member variable of an object inside my Repository on a LiveData- Object. The problem is, …

android-room android-livedata android-mvvm
How can I inject SharedPreferences in a ViewModel?

I am developing an android app whit MVVM approach, and I need access to the SharedPreferences in the ViewModel, but …

android dagger-2 android-mvvm
How to handle onClick or onTouch like events in ViewModel with data binding in MVVM Android

I have gone through many blogs related to MVVM model with Data Binding. As data binding with ViewModel makes it …

android mvvm android-databinding android-viewmodel android-mvvm
Android: MVVM is it possible to display a message (toast/snackbar etc.) from the ViewModel

I want to know what is the best approach to display some sort of message in the view from the …

android-toast android-snackbar android-mvvm
What is the difference between ViewModel and AndroidViewModel

For anyone having this question, As per Android Documentation, Since the ViewModel outlives specific activity and fragment instantiations, it should …

android android-mvvm android-architecture-lifecycle
Learn Android MVVM architecture components with kotlin

After searching about android architecture components I realized that MVVM is better than other architectures at some points so I …

android design-patterns kotlin android-architecture-components android-mvvm
How to check permission is granted in ViewModel?

I need to ask permission for contacts and when application starts I'm asking,in ViewModel part I need to call …

android android-activity permissions android-mvvm