jQuery Mobile lock orientation

I have tried to modify manifest.xml and it works. Simply add android:screenOrientation=”landscape” attribute to your activity tag like below: <application android:icon=”@drawable/ic_launcher” android:label=”@string/app_name”> <activity android:label=”@string/app_name” android:name=”.Phonegap_AppName” android:configChanges=”orientation|keyboardHidden” android:screenOrientation=”landscape”> <intent-filter> <action android:name=”android.intent.action.MAIN” /> <category android:name=”android.intent.category.LAUNCHER” /> </intent-filter> </activity> </application>

GameCenter authentication in landscape-only app throws UIApplicationInvalidInterfaceOrientation

While writing this question and experimenting with code, it seems that I’ve found a solution: enable all orientations in project summary and remove application:supportedInterfaceOrientationsForWindow. Add this code to ViewController: – (NSUInteger)supportedInterfaceOrientations { return UIInterfaceOrientationMaskLandscape; } Now it works seamlessly.

iPhone Landscape FAQ and Solutions

What’s in the documentation: In your view controller, override shouldAutorotateToInterfaceOrientation: to declare your supported interface orientations. This property will/should be checked by the controller infrastructure everytime the device orientation changes. – (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)orientation { return (orientation == UIInterfaceOrientationLandscapeRight); } This is the absolute minimum your view controller needs to do. If you want to launch your … Read more

Using UIImagePickerController in landscape orientation

If you’d like to use UIImagePickerController in landscape mode, use user1673099’s answer, but instead of: – (BOOL)shouldAutorotate { return NO; } use: – (UIInterfaceOrientationMask)supportedInterfaceOrientations{ return UIInterfaceOrientationMaskLandscape; } and then the picker would open in landscape mode: But make sure you check Portrait in deployment info:

Mobile site – force landscape only / no auto-rotate

Use media queries to test the orientation, in the portrait stylesheet hide everything and show a message that the app only works on landscape mode. <link rel=”stylesheet” type=”text/css” href=”https://stackoverflow.com/questions/10975387/css/style_l.css” media=”screen and (orientation: landscape)”> <link rel=”stylesheet” type=”text/css” href=”css/style_p.css” media=”screen and (orientation: portrait)”> I think is best aproach

Supported orientations has no common orientation with the application, and shouldAutorotate is returning YES’

In IOS6 you have supported interface orientations in three places: The .plist (or Target Summary Screen) Your UIApplicationDelegate The UIViewController that is being displayed If you are getting this error it is most likely because the view you are loading in your UIPopover only supports portrait mode. This can be caused by Game Center, iAd, … Read more

Force an Android activity to always use landscape mode

Looking at the AndroidManifest.xml (link), on line 9: <activity android:screenOrientation=”landscape” android:configChanges=”orientation|keyboardHidden” android:name=”VncCanvasActivity”> This line specifies the screenOrientation as landscape, but author goes further in overriding any screen orientation changes with configChanges=”orientation|keyboardHidden”. This points to a overridden function in VncCanvasActivity.java. If you look at VncCanvasActivity, on line 109 is the overrided function: @Override public void onConfigurationChanged(Configuration … Read more

tech