【问题标题】:Xamarin Android WebView Automatically restart on RotationXamarin Android WebView 旋转时自动重启
【发布时间】:2017-07-24 08:11:23
【问题描述】:

我在 Xamarin Android WebView 控件上遇到问题,当我旋转我的设备时,它会自动重新启动应用程序并让我访问我在 onCreate 加载的 url。 我在 android 清单文件中使用了android:configChanges="orientation|screenSize",但问题没有解决。请帮忙

【问题讨论】:

    标签: android xamarin webview xamarin.android screen-rotation


    【解决方案1】:

    通过添加此行,此问题得到解决。

        [Activity(Label = "Test App", MainLauncher = true, Icon = "@drawable/TestLogo", ConfigurationChanges = Android.Content.PM.ConfigChanges.ScreenSize | Android.Content.PM.ConfigChanges.Orientation)]
    

    【讨论】:

      猜你喜欢
      • 2010-10-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多