How to keep newWebView showing portrait?

Hello,

I have my app set to show in portrait mode. I have inserted a webview in the middle of the screen but when I rotate the device the web page inside the webview goes to landscape also. Is there any way to lock this to portrait?

Thanks,

Warren

Hi Warren,

You can listen for a system resize event (http://docs.coronalabs.com/api/event/resize/index.html) and rotate the web view accordingly, but note that native web views can’t currently be rotated on Android. So, you’d need to work around that somehow if you plan to deploy for both iOS and Android.

Best regards,

Brent

Hi Warren,

You can listen for a system resize event (http://docs.coronalabs.com/api/event/resize/index.html) and rotate the web view accordingly, but note that native web views can’t currently be rotated on Android. So, you’d need to work around that somehow if you plan to deploy for both iOS and Android.

Best regards,

Brent