https://kotlinlang.org logo
#android
Title
# android
t

Timo Obereder

12/17/2019, 11:32 AM
using dagger2 would it be wise to inject adapters (passing the viewmodelprovider) into a viewmodel and call it from there in the fragment/activity instead injecting it in the activity/fragment itself? (reason from someone else being some configuration change bug) ..not sure if this seems more plausible then normal injection in the activity/fragment?
a

Amirul Zin

12/18/2019, 1:03 AM
Injecting adapters… as in RecyclerView adapters, or class adapters? Since there shouldn’t be any View classes in any ViewModels.
t

Timo Obereder

12/19/2019, 2:19 PM
as in recyclerview adapters in this case
would kind of violate how mvvm was meant to be
3 Views