vector / com.haroldadmin.vector / ViewModelOwner

ViewModelOwner

sealed class ViewModelOwner

ViewModelOwner wraps the owner of a VectorViewModel.

Use it to get access to your object graph, arguments and saved instance state during the creation of the ViewModel.

DO NOT STORE A REFERENCE TO THIS IN YOUR VIEWMODEL

Extension Functions

Name Summary
context funViewModelOwner.context():Context
Get access to Context from a ViewModelOwner.

Inheritors

Name Summary
ActivityViewModelOwner class ActivityViewModelOwner :ViewModelOwner
A ViewModelOwner wrapping an Activity
FragmentViewModelOwner class FragmentViewModelOwner :ViewModelOwner
A ViewModelOwner which wraps the parent fragment of a ViewModel