android WebView rotation problem

MuneebHafeezMuneebHafeez USMember ✭✭

I've created a simple Xamarin Android app. in this app, there is only one webview and loaded a webpage. I entered the username and password and enter into the system. When i rotate my device, it automatically redirects to the login screen but it should not do so. can somebody help me?

Answers

  • MuneebHafeezMuneebHafeez USMember ✭✭
    edited July 24

    after adding this line of code, issue was resolved.
    [Activity(Label = "Test App", MainLauncher = true, Icon = "@drawable/TestLogo", ConfigurationChanges = Android.Content.PM.ConfigChanges.ScreenSize | Android.Content.PM.ConfigChanges.Orientation)]

  • Horus_SiriusHorus_Sirius DEMember ✭✭

    thank you!

    the webview rotation problem is gone with this adding in the mainactivity

    ConfigurationChanges = Android.Content.PM.ConfigChanges.ScreenSize | Android.Content.PM.ConfigChanges.Orientation

Sign In or Register to comment.