Top "Android-architecture-lifecycle" questions

AppCompatActivity not implementing LifecycleOwner

I am using Android Support Library 26.1.0. These are the dependencies in app module - implementation "android.arch.lifecycle:runtime:1.0.0" implementation "…

java android android-architecture-components android-architecture-lifecycle
Share ViewModel between fragments that are in different Activity

I have a ViewModel named SharedViewModel: public class SharedViewModel<T> extends ViewModel { private final MutableLiveData<T> …

android android-fragments android-activity viewmodel android-architecture-lifecycle
Forcing Paging Library DataSource refresh

In my ViewModel, I load data using private val pagingConfig = PagedList.Config.Builder() .setEnablePlaceholders(false) .setInitialLoadSizeHint(INITIAL_LOAD_SIZE_HINT) .…

android-architecture-components android-jetpack android-livedata android-paging android-architecture-lifecycle
How can I add unit test for android architecture components life cycle event?

I tried to add a unit test for my function which supports architecture components lifecycle event. To support lifecycle event, …

android android-testing android-architecture-components android-architecture-lifecycle
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
ViewModel refetches data when fragment is recreated

I am using Bottom Navigation with Navigation Architecture Component. When the user navigates from one item to another(via Bottom …

android android-architecture-components android-architecture-navigation android-architecture-lifecycle