We are developing phone-gap application.We have 4 pages like one.html,two.html,three.html,four.html.In this one(two.html) of the HTML file need to be landscape mode automatically.
Please guide to us.We are new to this.
We are developing phone-gap application.We have 4 pages like one.html,two.html,three.html,four.html.In this one(two.html) of the HTML file need to be landscape mode automatically.
Please guide to us.We are new to this.
Add this script first
<script type="text/javascript" src="cordova.js"></script>
Then inside another script tag
<script>
document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
var so = cordova.plugins.screenorientation;
so.setOrientation(so.Orientation.LANDSCAPE);
}
</script>
You can use the Screen Orientation PhoneGap Plugin for Android
Following is the link.