onCleared方法提供了釋放VM中資源的一個機會,在Activity/Fragment的onDestroy生命週期中被調用。類庫內部提供了一個實現類AndroidViewModel。 public ...
確定! 回上一頁