screen-orientation

Detecting Secondary Screen Orientation Visual Basic

做~自己de王妃 提交于 2019-12-24 20:46:43
问题 I can get primary screen orientation using this logic: MessageBox.Show(SystemInformation.ScreenOrientation()) How can I handle this if I have multiple screens?I only manage to get primary screen orientation information. How can I get additional / other screens orientation ? 回答1: According to Documentation, you can get all screens using System.Windows.Forms.Screen.AllScreens . Just iterate over them like so and check the resolution, like so: foreach (var screen in System.Windows.Forms.Screen

Locking Android orientation based on preference

非 Y 不嫁゛ 提交于 2019-12-24 18:41:53
问题 No, not a regurgitation of the old question, please, bear with me. I don't want to avoid activity recreation in general (no android:configChanges in manifest), I don't want to fix my orientation permanently (no android:screenOrientation in manifest) just because I'm lazy to implement instance saving. I have an app with three possible settings the user can make: 1. automatically changing layout on orientation, as per normal, 2. fixed portrait, 3. fixed landscape. It makes sense in my case

Need help on rotating image view with animation on orientation change (4 side rotation) in android

北城以北 提交于 2019-12-24 15:27:57
问题 i have a image view and i need to rotate(with IOS like animation) the image view on orientation change in android(portrait,landscape,reverse portrait and reverse landscape). please advice void rotateAndSet(int angle) { if (currentAngle != angle || currentImage != currentBaseImage) { // This // is // to // remove // unnecessary // drawing currentAngle = angle; currentImage = currentBaseImage; myImg = decodeBase64(currentBaseImage); matrix = new Matrix(); matrix.postRotate(angle); Bitmap

how to determine device orientation from the sensors

断了今生、忘了曾经 提交于 2019-12-24 15:19:43
问题 My activity is locked on LANDSCAPE. But still I need to know the orientation of the device. So I have elected to use sensors. I have the following code sensorManager = (SensorManager) getSystemService(SENSOR_SERVICE); sensorManager.registerListener(this, sensorManager.getDefaultSensor(Sensor.TYPE_ORIENTATION), SensorManager.SENSOR_DELAY_NORMAL); ... @Override public void onSensorChanged(SensorEvent event) { float[] values = event.values; // Movement float azimuth = values[0]; float pitch =

Android App orientation locked to landscape, locking the device, rotate it to portrait and unlock it, Application crash

本秂侑毒 提交于 2019-12-24 04:42:15
问题 My application is related to Music and I am using Android 4.2.2. I have locked my application to landscape mode by specifying below line in each of my activity: android:screenOrientation="landscape" Now, when I keep my Music application open in landscape mode, lock the screen of the device with the keys, rotate the device in portrait mode and then unlock the screen of the device will cause my Music application throw an Exception. I tried multiple solution like setting the configChanges in my

Nested Preference Screen closes on Screenorientation change in Android

て烟熏妆下的殇ゞ 提交于 2019-12-24 03:30:58
问题 I recently stumbled upon a problem. I am working with a Nested PreferenceScreen like this: <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" > <PreferenceScreen android:key="pref_name" android:title="@string/pref_title" > </PreferenceScreen> When my screen has the focus on the Nested Preference Screen and I change screenorientation, the Nested PreferenceScreen closes. I have also tried including: android:configChanges="orientation|keyboardHidden" in AndroidManifest

android screen orientation mixing up

橙三吉。 提交于 2019-12-24 03:09:20
问题 My android application is designed to be landscape-only. I have put android:screenOrientation="landscape" android:configChanges="orientation|keyboardHidden|screenSize" into the manifest. And it really launches in landscape orientation. And that's cool. But! I need to know device screen size to perform some calculations. And I have added following code into onCreate() : Display display = getWindowManager().getDefaultDisplay(); Point size = new Point(); display.getSize(size); // utilize size to

iPhone prevent rotation of keyboard to landscape

谁说我不能喝 提交于 2019-12-24 02:30:35
问题 So, I'm putting some controls over an MPMoviePlayerController and I'm intending this to be used in portrait mode, simply by using video that is shot vertically. My only problem is that for text entry the keyboard comes up in landscape. Now, I realize that there is an undocumented way to set the orientation of the player, but I'd rather not try this and get rejected at the app store. (FYI this is it): [moviePlayer setOrientation:UIDeviceOrientationPortrait animated:NO]; // not legal? I've

Android child activity and orientation lock

孤人 提交于 2019-12-24 01:01:24
问题 I've done quite a bit of searching and trial/error testing in trying to get my application fixed in portrait mode however I'm stumped on this one. Background: This application has a main activity which shows static images with various transition effects. It uses a sub activity to show a MediaPlayer because the SurfaceView (required to show the movie clip) cripples the display performance of the still image transitions. Both activities are locked in portrait mode and this seems to work pretty

shouldAutorotate not working with navigation controllar swift 2

余生颓废 提交于 2019-12-24 00:44:04
问题 my app uses several libraryies. Bassically KYDrawerController. I want my App to use only potraite Orientation but for one ViewControllar i need both landscape and Potrait. I have search about allmost every solution on the internet. every solution was to subclass the NavigationControllar and Override ShouldAutoRotate method. but non of them worked for me. and here is the closer View of the entire StoryBoard the gray color View is the KYDrawerControllar view which is an libry uses to work as