I want to display full screen a webView and get it full screen on device rotation, so i write this code :
<html>
<head>
<meta name = "viewport" content = "initial-scale = 1.0, user-scalable = yes" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<script type="text/javascript" src="NKit.js"></script>
</head>
<body>
<script type="text/javascript">
var widtha =320;
function NKIsPageSupportsAutoOrientation()
{
return "yes";
}
function pageWillRotate(degree) {
if(degree== -90 || degree== 90) {
widtha= 480;
webView1.hide();
webView2.init(0,0,widtha,300);
webView2.loadURL("http://nimblekit.com/");
webView2.setScalesToFit("yes");
webView2.show();
}
else
{
widtha= 320;
webView2.hide();
webView1.init(0,0,widtha,440);
webView1.loadURL("http://nimblekit.com/");
webView1.setScalesToFit("yes");
webView1.show();
}
}
var webView1 = new NKWebView;
webView1.init(0,0,widtha,440);
webView1.loadURL("http://nimblekit.com/");
webView1.setScalesToFit("yes");
webView1.show();
var webView2 = new NKWebView;
</script>
</body>
</html>
May be it could help some of us

