Sign in Go Pro

Android MvRx Fundamentals

Share ViewModels Across Fragments

This lesson is for PRO members.

Upgrade today to get access to all the PRO lessons.

Unlock this lesson
Autoplay

Up next

Previous

About

So far, our ViewModel has been scoped to a single Fragment. However, MvRxViewModels are great for sharing data across screens within an Activity. To share a ViewModel across screens, all you have to do is change your ViewModel property delegate from fragmentViewModel() to activityViewModel().
This lesson will walk through:
* fragmentViewModel()
* activityViewModel()
* existingViewModel()

Instructor

Links

Comments

There are no comments on this lesson, start the conversation below ...

>
You need to go PRO to post comments.

Lessons in Android MvRx Fundamentals