When to use RxJava in Android and when to use LiveData from Android Architectural Components?

I am not getting the reason to use RxJava in Android and LiveData from Android Architectural Components.It would be really helpful if the usecases and differences between the both are explained along with sample example in the form of code which explains the differences between the both. 9 Answers 9

AndroidViewModel vs ViewModel

With the introduction of the Android Architecture Components library, several new classes were introduced, including AndroidViewModel and ViewModel. However, I’m having trouble figuring out the difference between these two classes. The documentation succinctly describes AndroidViewModel as follows: Application context aware ViewModel I appreciate the brevity, but what exactly does this imply? When should we choose … Read more

How to clear navigation Stack after navigating to another fragment in Android

I am using The new Navigation Architecture Component in android and I am stuck in clearing the navigation stack after moving to a new fragment. Example: I am in the loginFragment and I want this fragment to be cleared from the stack when I navigate to the home fragment so that the user will not … Read more

What is AndroidX?

I am reading about a room library of Android. I see they changed package android to androidx. I did not understand that. Can someone explain, please? implementation “androidx.room:room-runtime:$room_version” annotationProcessor “androidx.room:room-compiler:$room_version” Even this is available with the android package also. implementation “android.arch.persistence.room:runtime:$room_version” annotationProcessor “android.arch.persistence.room:compiler:$room_version” What was in need of packaging new support libraries in androidx instead … Read more