Lock Screen Orientation
To lock the Orientation of an activity you simply add the ScreenOrientation attribute to the [Activity()] block in your activity. Also you need to add- using Android.Content.PM; Thats all, set the attribute to ScreenOrientation.Portrait or ScreenOrientation.Landscape.I am not to keen and trying to guess where things should go so I add a complete activity definition below which gives the same answer as this stack overflow post.
No comments:
Post a Comment