The only way I've found to do this and has worked for me is to handle
Configuration changes yourself.
On rotation remove the WebView from it's container (Usually a LinearLayout),
do the base configuration call, then reattach the WebView to it container.

(Summary from my own code):

[Activity( ConfigurationChanges = ConfigChanges.Keyboard |
ConfigChanges.KeyboardHidden | ConfigChanges.Orientation )]
         class BaseWebView : Activity
         {
        private WebView Browser;        

        protected override void OnSaveInstanceState( Bundle outState )
                {
                        base.OnSaveInstanceState( outState );
                        Browser.SaveState( outState );
                }

                protected override void OnRestoreInstanceState( Bundle 
savedInstanceState
)
                {
                        base.OnRestoreInstanceState( savedInstanceState );
                        if( savedInstanceState != null )
                                Browser.RestoreState( savedInstanceState );
                }

                public override void OnConfigurationChanged(
Android.Content.Res.Configuration newConfig )
                {
                        WebViewContainer.RemoveView( Browser );
                        base.OnConfigurationChanged( newConfig );
                        WebViewContainer.AddView( Browser );
                }
       }

    Hope this helps.
    Terry.





--
View this message in context: 
http://mono-for-android.1047100.n5.nabble.com/Webview-problem-with-screen-rotation-tp5711186p5711187.html
Sent from the Mono for Android mailing list archive at Nabble.com.
_______________________________________________
Monodroid mailing list
[email protected]

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid

Reply via email to