All you need is a portrait screen orientation. I screenOrientation parameter in the <activity> element in the manifest:

 android:screenOrientation="portrait" 

As a result, when the genymotion emulator is rotated, the application still moves from portrait orientation to landscape and back. What am I doing wrong? :)

I want to add that activity_main.xml contains AppBar and FrameLayout , which displays a fragment. Not only is this important :)

  • Try adding android:configChanges="orientation" - Serodv

1 answer 1

Emulators do not look at the manifest. Test on a real device

  • one
    Wow. I did not even know. Those. Are all my actions that I described correct? Just register portrait orientation in the manifest and that's it? :) - YaPV
  • @YaPV, of course: D just try on the device - Flippy
  • one
    Everything works fine :) I blunted, but thank you!) - YaPV