Software Archive
Read-only legacy content
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
17060 Discussions

make single page autorotate while lock orientation of other

Mour_D_
Beginner
454 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
454 Views
0 Kudos
Mour_D_
Beginner
454 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
454 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