我有個資料從FirstFragment.class傳遞到SecondFragment.class。(已經實作了,使用Safe Args)
但我需要用到資料的地方是SecondViewModel.class。
請問如何將資料從SecondFragment.class傳遞到SecondViewModel.class?謝謝!
I use Safe Args and LiveData to send args from FirstFragment.class to SecondFragment.class.
But I need the args in SecondViewModel.class, not in SecondFragment.class.
How to send the args from SecondFragment.class to SecondViewModel.class?
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/282458.html
標籤:Android
上一篇:list.add導致程式崩潰
