View Full Version : Lock orientation in sencha touch 2.0

7 Aug 2012, 1:38 AM
Any one know how to disable orientation change in sencha touch 2.0.

9 Aug 2012, 6:03 AM
Layouts are CSS based so we don't have control to lock orientation. The best you can do is size Ext.Viewport and rotate it when you determine orientation has changed.

14 Aug 2012, 6:25 AM
Thank michell. But using sencha touch with phone gap will solve :-/

14 Aug 2012, 8:46 AM
in packager.json, I saw the label: "orientations" with 4 parameter "portrait","landscapeLeft","landscapeRight","portraitUpsideDown".
Maybe when using sencha command sdk , i can run app only in portrait ?
Anyone help me

17 Aug 2012, 4:51 AM
Yes, in packager.json you can tell the device that it only wants to support certain orientations based on what you put in there so if you only want portrait, then only have the 2 (or just 1) portrait strings in that array.

This is only for building a native app, this will have no affect in the browser.

19 Aug 2012, 6:57 AM
I don't know.
I just test in android Emulator.
I config:

"orientations": [ "portrait"
But the device support portrait and landscape

4 Sep 2012, 8:30 AM
no one support me :(

18 Jan 2013, 11:32 PM
Locate the android-manifest file inside the stbuild and add android:screenOrientation="portrait" inside the <activity> </activity> tag. Now when we create a new android package and run it in the device, it will support only portrait orientation.

18 Jan 2013, 11:40 PM
I am currently working on an app where i need to create one package that runs on iPhone and iPad. My requirement is, I need to support only portrait mode in iPhone and support all orientations in iPad. I use senchaSDKtools to create native package after profiling. Can we by any chance specify the orientations for IPhone and iPad in the same Packager.json file. If so, how do we do it.
Thanks in advance...