Hi guys, i have a question about viewModel and fra...
# android
f
Hi guys, i have a question about viewModel and fragment, how i can share the same viewModel between more fragments?
h
Yes you can
s
by using a ViewModelProvider of the parent activity instead of the Fragment
f
By the way i can use inheritence for that? Creating a BaseViewModel to share with my fragments
and at same point specify the fragment lifecycle instead of activity?