Closed iainmerrick closed 7 years ago
Done! RunInActivity now respects ApplicationOptions.Orientation property, However, a better approach is to use UrhoSurface directly in your own activity in order to have more control over it (UrhoSurface doesn't have "orientation" issues). The line "android:screenOrientation="landscape"" was inserted to the final AndroidManifest.xml by sdl-release.aar lib.
While learning UrhoSharp, I figured I would update SamplyGame.Droid to use this new simple startup method. However, it always runs in landscape mode and I can't see a way to make it use portrait.
Looking at the source, the RunInActivity() method uses a new Intent to launch UrhoActivity, which has no attribute annotations. However, the following line is merged into AndroidManifest.xml:
In fact the same line is added twice! I can't see where in the build process that happens, but I'd love to know.
UrhoActivity should either inherit the orientation of the calling activity, or check the value of ApplicationOptions.Orientation.