Reputation: 1246
Our project has an Input Method Service. It is a custom keyboard where we call a Dialog to show some screens where the user is able to interact.
My question is:
Is it possible for a ViewModel to be used with Dialog class as we do it with Activity ?
Upvotes: 0
Views: 77
Reputation: 2005
You can use Viewmodel if your dialog extends a DialogFragment class. Viewmodels can be used with both activities and fragments.
Upvotes: 1