In my app, all of the stuff is only in Landscape mode. I don't want the app to be functional in Portrait mode. How do I limit the orientation?
Thanks.
On the main screen of Rotation Manager, select an orientation by tapping on either the vertical or horizontal icons next to a specific app to lock it into either landscape or portrait mode. Highlighting both icons will allow that particular app to auto-rotate.
If you don't want the screen to switch between portrait and landscape when you move the device, you can lock the screen orientation. To do this, swipe down from the right side of the top panel. Hold the device in the orientation in which you want it locked.
Android Settings Start by going to Settings => Display and locate the “Device rotation” setting. On my personal cell phone, tapping this will reveal two options: “Rotate the contents of the screen,” and “Stay in portrait view.”
As explained in this link the orientation limitation preference setting of the app is only enforced on a Windows 8 system with a supported HARDWARE ACCELEROMETER. This means that unless Windows knows how the system is orientated through the means of a supported sensor, it will not attempt to switch to the app's preferred orientation.
So it will all depend on the user's hardware.
I had this problem as well as I wanted to constrain my game to only landscape mode. I put this in my OnLaunched handler for App.xaml:
Windows.Graphics.Display.DisplayProperties.AutoRotationPreferences =
Windows.Graphics.Display.DisplayOrientations.Landscape;
However I noted that in the simulator it seemed to ignore this whereas on the hardware tablet I tested on it seemed to behave appropriately. The AutoRotationPreferences are bit flags so you can or together all the orientations you want to allow.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With