How to lock the screen to a specified orientation?
■ Summary
The following code snippet demonstrates how to lock the screen to a specified orientation.
■ Reference Sites
http://download.tizen.org/misc/examples/w3c_html5/device/the_screen_orientation_api/screen_orientation.html
The following code snippet demonstrates how to lock the screen to a specified orientation.
■ Reference Sites
http://download.tizen.org/misc/examples/w3c_html5/device/the_screen_orientation_api/screen_orientation.html
/**********************************************
* 1st way - Using the javascript file
**********************************************/
// portrait-primary, portrait-secondary, landscape-primary, landscape-secondary, portrait, and landscape.
screen.lockOrientation("portrait-primary");
/**********************************************
* 2st way - Using the config.xml
**********************************************/
<tizen:setting screen-orientation="landscape"/>