The problem that ViewModel solves

Let me start with the truth – “ViewModel is a choice , not a compulsion” . You can use any architecture that works for you , and probably you have one ( if you don’t then please have one as bloating your UI components is the worst practice ) . …

Leaking memory from ViewModel

In this post we are going to explore some of the problems that can be solved by using LiveData .  A ViewModel must never reference a view, Lifecycle, or any class that may hold a reference to the activity context.  A ViewModel lives longer than an Activity or a Fragment …