文章詳情頁
android - 使用Fragment時出現了奇怪的錯誤
瀏覽:47日期:2024-09-07 18:28:11
問題描述
API版本是23
問題解答
回答1:試試getSupportFragmentManager()
回答2:新建fragment繼承的extends Fragment時有兩種情況,一是導入app的,這時用getFragmentManager()。但是默認的是繼承v4的,這個用getSupportFragmentManager()。所以你把fragment改為導入app,或者改為getSupportFragmentManager()
回答3:同意樓上的說法,Fragment用的是哪個包的,樓主確認一下
相關文章:
1. python - TypeError: tryMsgcode() takes exactly 2 arguments (0 given)2. 環境搭建 - anaconda 創建python2.7環境中打開編譯器確是3.6版本3. extra沒有加載出來4. linux - Ubuntu下編譯Vim8(+python)無數次編譯失敗5. html5 - H5頁面喚起APP導航6. javascript - 彈出一個子窗口,操作之后關閉,主窗口會得到相應的響應,例如網站的某些登錄界面,django后臺的管理等,這是怎么實現的呢?7. 求救一下,用新版的phpstudy,數據庫過段時間會消失是什么情況?8. mysql replace 死鎖9. list - python 求助10. python - 數據與循環次數對應不上
排行榜
