若ViewModel 內需要使用context 就繼承AndroidViewModel。 2.當呼叫ViewModelProviders.of(this).get(MyViewModel.class); 之後,ViewModel 就會保存在記憶體中,直到 ...
確定! 回上一頁