問題記錄:Can not perform this action after onSaveInstanceState

報錯:Can not perform this action after onSaveInstanceState
原因:fragmenttransaction的commit方法調用報錯
解決方案:替換commitNow爲commitNowAllowingStateLoss
參考:https://blog.csdn.net/swer0808/article/details/92985282

發佈了33 篇原創文章 · 獲贊 2 · 訪問量 3萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章