使用ViewMode SavedState來使得ViewModel在系統殺死後臺程序的時候得以存活。 本集使用到的庫,需要在gradle中新增: implementation 'androidx.lifecycle:lifecycle- ...
確定! 回上一頁