In the Activity options, I'm setting ScreenOrientation = ScreenOrientation.SensorPortrait. However, Google have made a typo (see http://stackoverflow.com/questions/13017922/androidscreenorientation-sensorportrait-not-valid) and it should equate to sensorPortait and not sensorPortrait.
Not sure if this is related to bug 8328 (https://bugzilla.xamarin.com/show_bug.cgi?id=8328) but thought it was dissimilar enough to log a new bug.
Wow. OK, I *fixed* it to generate sensorPortait so that apps will build. Thanks for the report.
Hi there, looks like Google have fixed the problem from API 16.
Sorry for the bother.
Hitting this with XA 4.16
Targeting API 19. Just add "ScreenOrientation = ScreenOrientation.SensorPortrait" to your activity attributes and build.
Only compiling against <= API 15 works. Seems there is a typo in this, and depending on the API the attribute is not matching what is expected.
Looks like AndroidManifest.xml generation needs a targetSdkVersion check...
Created attachment 8607 [details]
The issue now Xamairn build tools create android:portait in the manifest file, even if API level >= 16 which shouldn't be the case
Android has 'portait' only for API level < 15
As a workaround you can set it by code in Activity::OnCreate()
Fixed in monodroid/master/ac63f45a
For which version of Xamarin Android was this marked as fixed?
Xamarin.Android Version: 4.20.2 and this is not fixed
It should be in the Beta channel at the moment.