Monday, March 17, 2014

Xamarin Android - Force Screen Orientation

To prevent the orientation of your app from changing ( regardless of the device settings )
add the ScreenOrientation flag and set it to the ScreenOrientation of your choice.
( the following example will force the screen orientation to Portrait )

[Activity (Label = "YourActivityname", MainLauncher = true, ScreenOrientation = ScreenOrientation.Portrait)]

No comments:

Post a Comment