Xamarin Android WebView 旋转时自动重启
Xamarin Android WebView Automatically restart on Rotation
我在 Xamarin Android WebView 控件上遇到问题,当我旋转我的设备时,它会自动重启应用程序并让我进入我在 onCreate 上加载的 url。
我在 android 清单文件中使用了 android:configChanges="orientation|screenSize"
,但问题没有解决。请帮助
通过添加此行,此问题已解决。
[Activity(Label = "Test App", MainLauncher = true, Icon = "@drawable/TestLogo", ConfigurationChanges = Android.Content.PM.ConfigChanges.ScreenSize | Android.Content.PM.ConfigChanges.Orientation)]
我在 Xamarin Android WebView 控件上遇到问题,当我旋转我的设备时,它会自动重启应用程序并让我进入我在 onCreate 上加载的 url。
我在 android 清单文件中使用了 android:configChanges="orientation|screenSize"
,但问题没有解决。请帮助
通过添加此行,此问题已解决。
[Activity(Label = "Test App", MainLauncher = true, Icon = "@drawable/TestLogo", ConfigurationChanges = Android.Content.PM.ConfigChanges.ScreenSize | Android.Content.PM.ConfigChanges.Orientation)]