Software Archive
Read-only legacy content
17060 Discussions

make single page autorotate while lock orientation of other

Mour_D_
Beginner
450 Views

i have make hybrid html app i want to show all pages in potriot mode while for just one page i want to allow auto rotate , how can i do this please guide

0 Kudos
3 Replies
Chris_P_Intel
Employee
450 Views
0 Kudos
Mour_D_
Beginner
450 Views

i tried below code but it is not working

<script src="intelxdk.js" type="text/javascript"></script>

 <script>

document.addEventListener("intel.xdk.device.ready", onDeviceReady, false);               

function onDeviceReady(){

    intel.xdk.device.setRotateOrientation('landscape');

}        
    </script>

but it seems not working

0 Kudos
Swati_S_Intel1
Employee
450 Views

Have you included the Intel XDK device plugin in the Projects page? To fix the orientation to landscape above code is correct. To release the fix orientation use

intel.xdk.device.setRotateOrientation("any");

 

0 Kudos
Reply