janishar / android-mvvm-architecture

This repository contains a detailed sample app that implements MVVM architecture using Dagger2, Room, RxJava2, FastAndroidNetworking and PlaceholderView
https://janisharali.com
Apache License 2.0
2.95k stars 936 forks source link

ViewModel Can be inject directly, without using ViewModelFactory #53

Open dalwadi2 opened 5 years ago

dalwadi2 commented 5 years ago

ViewModel Can be inject directly, without using ViewModelFactory like Activity in Fragments and Dialog. Implement that in fragments and dialogs.

HuuNguyen312 commented 5 years ago

When ViewModel is injected directly, without using ViewModelFactory -> Fragment ViewModel's onCleared not called