landscape

Force an Android activity to always use landscape mode

风流意气都作罢 提交于 2019-11-26 11:04:36
I am using the Android VNC viewer on my HTC G1 . But for some reason, that application is always in landscape mode despite my G1 is in portrait mode. Since the Android VNC viewer is open source, I would like know how is it possible hard code an activity to be 'landscape'. I would like to change it to respect the phone orientation. 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

jQuery Mobile lock orientation

戏子无情 提交于 2019-11-26 08:28:38
问题 Hey guys i\'m using phonegap and jquery mobile to build an app for an android phone. Is there a possibility to lock the orientation on one page? E.g. page \"map\" is loaded and the orientation is locked to \"landscape\" mode. 回答1: Not really i think. In xCode for iOS apps is it not possible. The only fix I can come up with, is to rotate your body or a wrapper acording to window.orientation $(window).bind("orientationchange", function(){ var orientation = window.orientation; var new

Crash on presenting UIImagePickerController under iOS 6.0

落花浮王杯 提交于 2019-11-26 08:02:15
问题 My app only supports landscape orientations via the supportedInterfaceOrientation properties. Using an iOS prior to iOS 6, my app can successfully load an instance of UIImagePickerController via presentViewController:animated:completion: even though the UIImagePickerController itself only supports portrait orientation. The image picker simply presented itself sideways to the user. The user rotated the phone, picked their image, and then rotated back to landscape. Under iOS 6.0, calling

Mobile site - force landscape only / no auto-rotate

孤人 提交于 2019-11-26 07:34:12
问题 I have a site that has a mobile stylesheet: <link rel=\"stylesheet\" href=\"css/mobile.css\" media=\"handheld\"> I\'m also using jQuery to check for mobile devices and alter functionality accordingly. But I want to know if there is a way to force landscape-only orientation and disable auto-rotate? Either a CSS or a jQuery solution would be fine. Thanks! 回答1: Use media queries to test the orientation, in the portrait stylesheet hide everything and show a message that the app only works on

Only ONE VIEW landscape mode

心已入冬 提交于 2019-11-26 06:20:48
问题 I finished my iOS app but I need to set only ONE view to landscape mode, the rest of the views can only be seen in portrait mode. I\'m using Xcode 5.1 and I created all of my Views by dropping in my storyboard View Controllers from the right panel, so if you are going to tell me to write some code somewhere, please tell me exactly where I need to write it. I read one solution here UINavigationController Force Rotate but I don\'t know where to write that code. Do I need to create one

UIImagePickerController in Landscape

血红的双手。 提交于 2019-11-26 05:26:43
问题 I have been searching for an answer to this, but cannot come up with anything. Apparently, iPhone SDK 3.0 made it possible that UIImagePickerController can be displayed in landscape mode - but I am not finding any method that will allow this. I would think that if the application is in landscape by default it would automatically adjust the image controller, but that is not working for me. Thanks for any help! 回答1: I haven't checked whether this is illegal, but it worked for me. If you want

Getting android.content.res.Resources$NotFoundException: exception even when the resource is present in android

烂漫一生 提交于 2019-11-26 03:57:10
问题 Please let me know where I am going wrong to get the error. I am creating an app which have one of its activity to be only in landscape mode. So I added the following in AndroidManifest.xml file <activity android:name=\".LandScapeImageActivity\" android:screenOrientation=\"landscape\"></activity> I have created a folder like /res/layout-land and add a layout called see_today_landscape_layout in it. and in onCreate() I added the following protected void onCreate(Bundle savedInstanceState) {

iPhone app in landscape mode, 2008 systems

混江龙づ霸主 提交于 2019-11-26 03:33:11
问题 Please note that this question is from 2008 and now is of only historic interest. What\'s the best way to create an iPhone application that runs in landscape mode from the start, regardless of the position of the device? Both programmatically and using the Interface Builder. 回答1: Historic answer only. Spectacularly out of date. Please note that this answer is now hugely out of date/ This answer is only a historical curiosity . Exciting news! As discovered by Andrew below, this problem has

Supported orientations has no common orientation with the application, and shouldAutorotate is returning YES&#39;

一笑奈何 提交于 2019-11-26 02:31:51
问题 My app (iPad;iOS 6) is a landscape only application, but when I try using a UIPopoverController to display the photo library it throws this error: Supported orientations has no common orientation with the application, and shouldAutorotate is returning YES. I\'ve tried changing a lot of the code around but I\'ve had no luck. 回答1: In IOS6 you have supported interface orientations in three places: The .plist (or Target Summary Screen) Your UIApplicationDelegate The UIViewController that is being

How do I specify different layouts for portrait and landscape orientations?

↘锁芯ラ 提交于 2019-11-26 00:58:28
问题 I\'ve seen references to being able to specify two separate layout xml files for an activity, one for Portrait and one for Landscape. I\'ve not been to find any information on how to do that though. How do I specify for each activity which xml file is it\'s portrait layout and which is the Landscape layout? Is it also possible to specify different layouts for different screen sizes? If so, how is this done? 回答1: Create a layout-land directory and put the landscape version of your layout XML