Home > Mobile >  Fragments how to pass data to the viewmodel?
Fragments how to pass data to the viewmodel?

Time:05-04

I have a data from FirstFragment. Class to SecondFragment. Class , (has achieved, the use of Safe Args)
But I need to use data is Second the ViewModel. class ,
Excuse me, how the data from the SecondFragment. Class to Second the ViewModel. class ? Thank you very much!


I use Safe Args and LiveData to send the Args from FirstFragment. Class to SecondFragment. Class.

But I need the args SecondViewModel. In class, not in SecondFragment. Class.

How to send the args from SecondFragment. Class to SecondViewModel. The class?
  • Related