screen-orientation

How do I get a textView to expand when screen is rotated from portrait to landscape in iOS

冷暖自知 提交于 2019-12-11 12:49:53
问题 I am using the Interface Builder to create this UI: And when it is in portrait the One and Two TextViews fill the width of the screen (which is what I want), but when I rotate it to landscape mode the TextViews do not take up the full width of the screen. How can I get the TextViews to fill the width of the screen in landscape mode? In the Interface Builder, the "Autolayout" option is checked and if possible I would like to accomplish this with it still checked since everything else works

ADB set display-size is incorrectly displaying portrait using landscape

跟風遠走 提交于 2019-12-11 12:47:28
问题 I am using the adb feature to set the screensize to see how the app looks on smaller screens. using the command : adb shell am display-size 1200x720 in 4.3 the command is adb shell wm size 1200x720 But it is seems to be behaving stupidly as it displays portrait view of the app in landscape view of the device. Leaving so much screen not used and result is a smaller looking device than need be. The device is the Nexus 7 回答1: Just swap the order of the dimensions. So instead of 1200x720, use

android:screenOrientation=“sensorLandscape” showing error for a project with the minimum SDK as 2.2

≯℡__Kan透↙ 提交于 2019-12-11 10:06:50
问题 I'm trying to set android:screenOrientation="sensorLandscape" for one of my activities, to enable landscape left and landscape right. In my project properties, I've set the project build target to Android 2.2. In my manifest, the minimum SDK version is set to Android 2.2 as well (API level 8): The line in my manifest is: <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="10"/> According to the docs, the "sensorLandscape" attribute should be available to me, but still, when I try

Intent for screen orientation change

倾然丶 夕夏残阳落幕 提交于 2019-12-11 10:04:51
问题 I'm wondering whether android broadcasts a intent when the screen orientation changes. I am programming a live wallpaper and want to deal with it when the screen orientation changes. I can handle the same with regular apps. 回答1: Android system doesn't broadcast an Intent, but restarts the activity by default. If you want to override this you should override onConfigurationChanged(Configuration) method of your activity. To get this method called you should also specify the changing in android

Changing Screen Orientation in android

China☆狼群 提交于 2019-12-11 08:29:16
问题 i want to change the Screen Orientation to SENSOR when the Frame Layout is visible (i.e video is playing in full screen) which is working fine , But i want to revert it back to PORTRAIT when the frame layout is gone Which is Not working (No Errors, but the code is not doing anything) i have tried this so far // Finally show the custom view container. mCustomViewContainer.setVisibility(View.VISIBLE); mCustomViewContainer.bringToFront(); // auto orientation change if video is playing if

First UIView in Portrait orientation and second in Landscape

喜你入骨 提交于 2019-12-11 07:04:18
问题 I have an app which has 2 view controllers. The first viewcontroller should be in portrait and it's ok, but when I'm loading the second view controller, I could not make the app orientation to be landscape... The problem is with iOS 6. I have tried everything I found on SO. Using [[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationLandscapeRight animated:NO]; on viewWillAppear and viewDidLoad , and also: - (BOOL)shouldAutorotateToInterfaceOrientation:

OnItemSelectedListener called on screen rotation

拟墨画扇 提交于 2019-12-11 06:44:23
问题 When I change the orientation of my screen in Android, an OnItemSelectedListener from a Spinner is called. It's not just the emulator, it also happens on a physical phone. How can I stop this from occurring? Cheers. 回答1: Spinners are always selected. Your OnItemSelectedListener will be called when there is any change in the state of the Spinner , including when the Spinner is first set up. A normal orientation change will result in your activity being destroyed and recreated. So, if your

Android Screen Orientation Change Causes App To Quit

和自甴很熟 提交于 2019-12-11 05:48:45
问题 I have an app that I set to only display in Portrait mode by setting android:screenOrientation="portrait" for each Activity in the manifest. This works fine and my app screen does not rotate when I rotate the phone. The problem is, if I start the app with the phone in Portrait orientation, then as my first Activity runs (an animated splash screen) and I rotate the phone to Landscape while the first Activity is still running, when the next activity is launched (it is launched from the finally

Android Screen Orientation: Landscape Back to Portrait

浪子不回头ぞ 提交于 2019-12-11 05:47:59
问题 I have designed an activity that its orientation is landscape. Also I have designed another that its orientation is portrait. When I run in my phone, there are some problems comes to when the landscape activity back to the portrait activity. Some of the layout disappear, such as below original: after can anyone help me to solve this problem?Thank you so much! <activity android:name="TestingActivity" android:screenOrientation="portrait" android:configChanges="orientation" > </activity>

How to lock tablet screen rotation in UWP app?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-11 04:39:33
问题 I wanted my UWP app, running on windows 10, to support only Landscape orientations, but here is a one problem. First i founded this question: link This example from GitHub works fine then I try to set orientation with checkboxes, and when i set orientation like this: DisplayOrientations orientations = DisplayOrientations.Landscape; DisplayInformation.AutoRotationPreferences = orientations; it works too. Great. But here is an issue. If you'll try to press Start to suspend app and press it