erikjhordan-rey / People-MVVM

Sample created to practice MVVM and DataBinding in Android Applications.
https://erikjhordan-rey.github.io/blog/2015/12/15/ANDROID-databinding-android.html
667 stars 193 forks source link

Violation of ViewModel guidelines #31

Closed thekarthiksankar closed 5 years ago

thekarthiksankar commented 5 years ago

You're violating the guidelines of the ViewModel!

Since, ViewModel objects are designed to outlive specific instantiations of views or LifecycleOwners. This design also means you can write tests to cover a ViewModel more easily as it doesn't know about view and Lifecycle objects.

Reference : https://developer.android.com/topic/libraries/architecture/viewmodel#implement

erikjhordan-rey commented 5 years ago

Probably I'm violating a lot of rules but I did this sample before arch components or some guideline exists so I started to create the new implementation -> https://github.com/erikjhordan-rey/People-MVVM-Jetpack!