landscape-portrait

landscape layout does not change on orientation change and portain layout does not change in orientation change

心已入冬 提交于 2019-12-23 02:45:15
问题 i have two layouts here one is portrait and one is landscape the landscape is located in the layout-land folder and the the portrait is located in the layout folder both have the same name. what i want to do here is that when the emulator screen is portrait it will load portrait and when the screen is landscape it will load a landscape layout but it is not happening when the first view is portrait and when i change orientation it still loads the portrait layout in landscape view and when its

Supporting Universal App with Portrait Orientation on iPhone and Landscape+Portrait on iPad

天涯浪子 提交于 2019-12-21 16:56:28
问题 I need my app to be compatible both on iPad and iPhone. Its having a tabbarController as the rootViewController. In iPad I need it to be available both on Landscape and Portrait. In iPhone though I need the rootView to be Portrait itself and i do have some viewsControllers, which are being presented on the tabbarController, which need to be available both in landscape and Portrait (e.g. a viewController used to play videos from Youtube). So I am locking the rotation of the tabbarController as

How to prevent a Phonegap application to switch to landscape view

倖福魔咒の 提交于 2019-12-21 03:16:08
问题 This one should be very simple, however it's not. I'm trying to prevent my application from going into landscape view so I've changed the config.xml file like this: <preference name="orientation" value="portrait" /> . Unfortunately, it's not working. Any ideas? 回答1: Ok, so I got it: The reason Phonegap ignored the <preference name="orientation" value="portrait" /> in the config.xml file is because my app was in debug mode. once I created a release version it stopped from going to landscape.

How to make an ipad app only portrait?

旧时模样 提交于 2019-12-18 16:38:10
问题 I am making an ipad app, and i set the the app to only portrait, but it still works in landscape? Why is this happening only on an ipad? How do i fix this? Note: if the answer is in code, please write it in swift. 回答1: In xcode select your project. Go to Targets -> General, scroll down and you can select the Orientation as portrait only. You can also make change to info.plist file to select proper orientations for Supported interface orientations (iPad) 回答2: In deployment Info section you can

android camera portrait orientation

只谈情不闲聊 提交于 2019-12-18 01:05:48
问题 I am using camera in my app. I am just using intent to start camera Intent cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE); cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri); startActivityForResult(cameraIntent, 101); The captured image automatically comes in landscape view . How do i make camera to capture images in portrait view 回答1: If device has v2.2 or above you can rotate camera orientation to portrait using camera.setDisplayOrientation(90) . In

Portrait and Landscape mode in iOS6

橙三吉。 提交于 2019-12-17 16:13:38
问题 When updating my app to iOS6 standard the portrait / landscape is gone. Ir worked perfectly when I was building with Xcode 3. But now using latest Xcode and latest SDK the rotation is gone and it is always in portrait mode. No matter what I put in "Supported interface Orientations". And the code I used to get rotation before seems to have no effect at all. I had these lines. - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation { switch

Splash-screen rotation not woking in Landscape mode on iOS devices

痴心易碎 提交于 2019-12-13 07:36:41
问题 I took over a project using AngularJS, Ionic and Bootstrap to create hybrid apps for mobile devices. Prior to upgrade to XCode 7 all went well. I updated my HTML-, CSS- and JS-code in editor, ran grunt run:ios to create platform code and opened XCode. From there I built the .ipa-file without any issues (just with some warnings, which could be ignored). However since using XCode 7 (needed for iOS 8- and iOS 9-devices), the splascreen will be shown incorrectly. Meaning: In Portrait mode. Note

How to disable specific orientation in iOS

谁说我不能喝 提交于 2019-12-12 15:57:20
问题 I want to disable landscape orientation in some view. I have overridden the following two methods but these method is not going to call at any time. - (NSUInteger) supportedInterfaceOrientations { return UIInterfaceOrientationMaskPortrait; } - (UIInterfaceOrientation) preferredInterfaceOrientationForPresentation { return UIInterfaceOrientationPortrait; } Am I missing something? Please help me. 回答1: Create subclass of UINavigationController and override these methods as per below: -

How to change only one ViewController to landscape mode with UINavigationcontroller

谁说我不能喝 提交于 2019-12-12 04:36:19
问题 I have two view controllers,I have some videos in FirstViewController,if I click on video it will display on SecondViewController with landscape mode,after clicking back button again the FirstViewController should appear in Potrait mode.Here is my code -(NSUInteger)supportedInterfaceOrientations { return UIInterfaceOrientationMaskLandscape; } but it not works for me. Thanks 回答1: I made a simple workaround at this question a few weeks ago. If you want, you can link the return value of the

device rotated but screen not stretches

早过忘川 提交于 2019-12-12 02:04:20
问题 in my iphone app i have returned yes in the following method ,its worked and screens are rotating but contents are not fitting to the screen when its in the landscape mode following is the code which i used - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return YES; } following is my output how can i fit the contents of the screen to the screen size when its rotated,,can any one help me, thanx in advance,, 回答1: You should reset the views frame