-
7 Aug 2012 1:38 AM #1
Lock orientation in sencha touch 2.0
Lock orientation in sencha touch 2.0
Any one know how to disable orientation change in sencha touch 2.0.
-
9 Aug 2012 6:03 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,656
- Vote Rating
- 435
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.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
14 Aug 2012 6:25 AM #3
Thank michell. But using sencha touch with phone gap will solve

-
14 Aug 2012 8:46 AM #4
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 #5Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,656
- Vote Rating
- 435
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.Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
19 Aug 2012 6:57 AM #6
I don't know.
I just test in android Emulator.
I config:
But the device support portrait and landscapeCode:"orientations": [ "portrait" ]
-
4 Sep 2012 8:30 AM #7
-
18 Jan 2013 11:32 PM #8
Locate the android-manifest file inside the stbuild and add android
creenOrientation="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 #9
Hi,
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...


Reply With Quote