Forum Xamarin.Android


The Xamarin Forums have officially moved to the new Microsoft Q&A experience. Microsoft Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

To create new threads and ask questions head over to Microsoft Q&A for .NET and get involved today.

android WebView rotation problem

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?


  • MuneebHafeezMuneebHafeez USMember ✭✭
    edited July 2017

    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.