Locking the Android application orientation

According to the Google design guidelines, the Android application must respond to the device orientation and display an appropriate layout for the given orientation. However, some kind of applications, such as games, video players, and so on, are intended to restrict the orientation to landscape or portrait only. For native Android applications, this can be achieved using the android:screenOrientation property to the <activity> declaration in the AndroidManifest.xml descriptor file. Xamarin makes this even simplified and recommends that you do not to edit the AndroidManifest.xml file manually at any point of time, instead it allows you to set all the application configuration metadata using [Activity] ...

Get Xamarin Mobile Application Development for Android - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.