I wrote a simple game where you need to control a rocket and dodge asteroids flying at you. The orientation is horizontal, however the user holds the device vertically. And here is the problem. The player needs to keep the device not from below, as usual, where are the buttons home, back, etc., and on top, where there is a camera. Is there any way to correct this misunderstanding? There you can write some parameter in the manifest or something else ... I really need help)

1 answer 1

Add to manifest activity

android:screenOrientation="reversePortrait" 

Here you can see all modes: https://developer.android.com/guide/topics/manifest/activity-element.html?hl=ru#screen

  • Thanks, used setRequestedOrientation (ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE); - En1q0d