I'm working on HTML5\JS application with Kendo UI (Appbuilder, cordova). And here is the issue: how can I manually set orientation (landscape\portrait). Thanks!
Asked
Active
Viewed 738 times
0
-
Do you mean that you want to make your app *always* only display in one orientation, or do you mean that you want to force the orientation to one or the other at any time even if the device isn't rotated that way? – CodingWithSpike Jul 10 '14 at 21:00
-
I want my app always display in landscape. – korovaisdead Jul 11 '14 at 06:23
2 Answers
0
In AppBuilder, in the Properties -> General section, you can choose the supported device orientations. Just uncheck "portrait" and your app will only run in landscape mode.

Rob Lauer
- 3,075
- 1
- 32
- 44
0
If you don't want to just toggle the setting in AppBuilder as Rob answered, you coudl edit it in the Cordova config.xml file:
<preference name="Orientation" value="landscape" />
This Javascript might work (taken from here):
function shouldRotateToOrientation(interfaceOrientation) {
return (3 === interfaceOrientation);
}
Otherwise, see these possible duplicates:
Cordova iOS Change Screen Orientation To Landscape on a Single Page

Community
- 1
- 1

CodingWithSpike
- 42,906
- 18
- 101
- 138