screen-orientation

iOS 7+ Dismiss Modal View Controller and Force Portrait Orientation

醉酒当歌 提交于 2019-12-31 20:44:11
问题 I have a UINavigationController as the root view controller of my UIWindow on iOS 7 and iOS 8. From one of its view controllers, I present a fullscreen modal view controller with a cross-dissolve presentation style. This modal view controller should be able to rotate to all orientations, and it works fine. The problem is when the device is held in a landscape orientation and the modal view controller is dismissed. The view controller which presented the modal only supports portrait

How to fix screen orientation to portrait for my whole PhoneGap app

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-31 18:58:51
问题 How to configure the Phonegap app to be fixed to only portrait mode, I there any possibility to do it with CSS or JavaScript so that I should be able to get the consistent behaviour across the platforms I found this useful post detecting-displays-orientation-change-on-mobile-devices-with-accelerometer-a-platform-indipendent-approach Here it is explained how to detect the orientation, but I need to configure it Is it possible through CSS3 Media queries? 回答1: To fix your orientation in portrait

Delphi Android - detect device orientation change

孤人 提交于 2019-12-30 05:06:10
问题 New to both Delphi Android development. How do I detect that the screen orientation has changed? i.e. from Portrait to Landscape and vice versa? And how do I fire off code when this happens? For example I have an image sized at let's say 300x200 in portrait mode but when the device switches to landscape I want it to adjust and take up full screen width. 回答1: In your form implement a method procedure DoOrientationChanged(const Sender: TObject; const M: TMessage); where you handle the current

Different Device Orientation according to device (iPhone or iPad)

若如初见. 提交于 2019-12-30 02:13:26
问题 I'm working on a Universal project with these requirements: For iPhone, I want only the portrait orientation. For iPad, only landscapes. How do I do that for iOS 8 (Swift)? 回答1: Following the advice of @ScarletMerlin , changing the keys in info.plist is, in my opinion, the best solution for the requirements I have to fulfill (fixed orientation type for each kind of device). Here is a print screen from the settings I use. Maybe it can help other developers with similar doubt. The relavent

why does the gingerbread emulator orientation get stuck in apps?

痞子三分冷 提交于 2019-12-29 05:46:11
问题 At first I thought this was a problem with my app, but it seems to be happening in any app (though interestingly, not the home screen) in the gingerbread emulator. To replicate my issue, open eclipse and fire up the android emulator for gingerbread (I'm using the "Google APIs - API Level 9" as my target) So the procedure to duplicate once the emulator loads is press LCtrl-F11 to shift orientation to landscape, then again to switch to portrait Result: In the homescreen: The view rotates to

Why doesn't my Cordova/PhoneGap iOS app rotate when the device rotates?

北城以北 提交于 2019-12-28 02:06:27
问题 I am trying to make a landscape only app, but I am not able to produce any rotation at all. There used to be a autorotate setting in PhoneGap.plist but in phonegap 1.8.0 I can find it. Does it still exists? What else could be wrong that my application is not rotating? UPDATE I know have webpage containing only one word "test". I set target device to iPad only and enabled all four orientations. What could still be wrong? Do need to have a special html document type? Do I need to include some

How can i rotate the particular view landscape or portrait programatically in android?

牧云@^-^@ 提交于 2019-12-26 05:07:53
问题 how can rotate the particular view in Landscape or portrait mode in dynamically in android. i am using the this method setRequestedOrientation (ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); but it total layout going to landscapmode .but i want particular view in landscape mode. so,please tell me anyone known .Advance thanks to all 回答1: Following is code which i used to display your activity into landscape mode <activity android:screenOrientation="landscape" android:configChanges="orientation

How can i rotate the particular view landscape or portrait programatically in android?

北战南征 提交于 2019-12-26 05:05:52
问题 how can rotate the particular view in Landscape or portrait mode in dynamically in android. i am using the this method setRequestedOrientation (ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); but it total layout going to landscapmode .but i want particular view in landscape mode. so,please tell me anyone known .Advance thanks to all 回答1: Following is code which i used to display your activity into landscape mode <activity android:screenOrientation="landscape" android:configChanges="orientation

Lock camera / screen orientation to landscape with Ionic / ngCordova

与世无争的帅哥 提交于 2019-12-25 04:45:15
问题 I am trying to lock camera orientation to portrait in the app and to landscape in the camera. For camera access I am using $cordovaCapture pluggin. For orientation cordova-plugin-screen-orientation. Both plugins work but orientation plugin doesn't affect camera. (Testing in an Android) screen.lockOrientation('portrait'); $scope.captureVideo = function() { var options = { limit: 1, duration: 15 }; screen.lockOrientation('landscape'); $cordovaCapture.captureVideo(options) .then(function

Locking phone in portrait mode

五迷三道 提交于 2019-12-25 02:27:12
问题 I want to change the rotation mode in my application programmatically. All the discussions I found were about disabling rotation in specific Activities. I want to lock the whole phone in portrait mode. How do I accomplish this? Edit. To clarify, I want to lock the whole phone including all other apps, settings etc. Not just my own app. 回答1: Add the following to your Activities onCreate: setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); 回答2: The easiest, fastest, and