Xamarin.Android 开发中遇到旋转屏幕错误
生活随笔
收集整理的這篇文章主要介紹了
Xamarin.Android 开发中遇到旋转屏幕错误
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
錯誤信息 : System.NotSupportedException: Unable to find the default constructor on type App5.MyFragment.? Please provide the missing constructor.
錯誤圖片:
解決方法:干脆不讓他旋轉屏幕,當下QQ、微信等app都沒有旋轉等功能,且旋轉后重新繪制界面影響用戶使用。
?this.RequestedOrientation = Android.Content.PM.ScreenOrientation.Portrait;//豎屏,禁止橫屏
?this.RequestedOrientation = Android.Content.PM.ScreenOrientation.Nosensor;//橫屏,禁止豎屏
轉載于:https://www.cnblogs.com/swjian/p/10206466.html
總結
以上是生活随笔為你收集整理的Xamarin.Android 开发中遇到旋转屏幕错误的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: MNN量化—ADMM优化算法
- 下一篇: Android:DELETE_FAILE