Bug 12935 - sensorPortrait should be sensorPortait
Summary: sensorPortrait should be sensorPortait
Status: RESOLVED FIXED
Alias: None
Product: Android
Classification: Xamarin
Component: Bindings ()
Version: 4.6.x
Hardware: PC Windows
: High normal
Target Milestone: ---
Assignee: dean.ellis
URL:
Depends on:
Blocks:
 
Reported: 2013-06-28 04:30 UTC by Dave Wright
Modified: 2015-04-27 06:18 UTC (History)
6 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Sample repro (11.08 KB, application/zip)
2014-11-03 15:34 UTC, Jon Douglas [MSFT]
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Dave Wright 2013-06-28 04:30:14 UTC
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.
Comment 1 Atsushi Eno 2013-06-28 05:44:31 UTC
Wow. OK, I *fixed* it to generate sensorPortait so that apps will build. Thanks for the report.

[master 6bf9591]
Comment 2 Dave Wright 2013-11-15 10:49:18 UTC
Hi there, looks like Google have fixed the problem from API 16.

http://stackoverflow.com/questions/12129558/error-string-types-not-allowed-at-screenorientation-with-value-sensorportai

Sorry for the bother.
Comment 3 John Miller [MSFT] 2014-08-27 17:17:17 UTC
Hitting this with XA 4.16

Targeting API 19. Just add "ScreenOrientation = ScreenOrientation.SensorPortrait" to your activity attributes and build.
Comment 4 John Miller [MSFT] 2014-08-27 17:27:56 UTC
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.
Comment 5 Jonathan Pryor 2014-08-27 17:31:24 UTC
Looks like AndroidManifest.xml generation needs a targetSdkVersion check...
Comment 6 Jon Douglas [MSFT] 2014-11-03 15:34:34 UTC
Created attachment 8607 [details]
Sample repro
Comment 10 Andrei.N 2015-02-24 08:32:06 UTC
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()
Comment 11 dean.ellis 2015-02-26 15:36:28 UTC
Fixed in monodroid/master/ac63f45a
Comment 12 Andrei.N 2015-04-27 03:26:15 UTC
For which version of Xamarin Android was this marked as fixed?

I have 
Xamarin.Android Version: 4.20.2 and this is not fixed
Comment 13 dean.ellis 2015-04-27 06:18:34 UTC
It should be in the Beta channel at the moment.