Search code examples
androidandroid-emulatormaui

Setting orientation of Android Emulator - Pixel 5 - API 33


I use the Pixel 5 - API 33 (Android 13.0 - API 33) Emulator to run and test my .NET MAUI Application for Android.

On iOS-Simulator there is a button to switch the orientation of the App as if I would really turn my mobile phone from Portrait to Landscape view.

In the obove Androit-Emulator I can only Buttons called "Rotate left" and "Rotate right", but they do not switch the Orientation but the entire Emulator which is kind of funny since it shows the exact same view only rotated.

For a test of the real world and for a test on a real device, I would expect that the actual content of the App should be switched and I can see how my app behaves when doing it.

Is there a way to do this? Or how do you test this?


Solution

  • This is because the android emulator's Auto-rotate function's default state is off. You needs to turn it on manually.

    enter image description here