How do I change screen orientation in the Android emulator?
Master System Design with Codemia
Enhance your system design skills with over 120 practice problems, detailed solutions, and hands-on exercises.
Introduction
Changing orientation in the Android emulator is usually simple, but there are two different layers involved: rotating the virtual device and allowing the Android system or app to respond to that rotation. If rotation seems broken, the problem is often not the emulator control itself but rotation lock or app configuration.
Use the Emulator Rotation Controls
The most direct method is the emulator toolbar. In the running emulator window, use the rotate-left or rotate-right buttons. That simulates a device orientation change the same way a physical phone would rotate.
If you prefer keyboard shortcuts, open the emulator help pane to view the current mappings for your setup. Shortcut details can vary depending on whether the emulator is embedded in Android Studio or running in a separate window.
The important point is that these controls simulate the device being turned. They do not force your activity to ignore its manifest settings.
Make Sure Auto-Rotate Is Not Locked
If the emulator rotates but the screen contents do not, the Android system may have auto-rotate disabled. You can check the quick settings panel inside the emulator and make sure rotation lock is off.
For scripted testing, adb can help inspect or change the system setting.
In many builds, user_rotation values map like this:
- '
0for portrait' - '
1for landscape' - '
2for reverse portrait' - '
3for reverse landscape'
To restore sensor-based rotation:
This is useful when tests need a predictable orientation instead of manual clicking.
Your App May Be Preventing Rotation
Even if the emulator rotates correctly, an app can opt out of normal rotation behavior. For example, an activity may be locked to portrait in the manifest.
If that attribute is present, the emulator can rotate but the activity will remain portrait. Likewise, apps that handle configuration changes manually may not recreate the activity in the way you expect.
For a normal rotation-driven recreation flow, leave the system in control and observe lifecycle callbacks.
Rotating the emulator should trigger a configuration change unless you intentionally overrode that behavior.
Test What You Actually Care About
There is a difference between testing the emulator UI and testing orientation handling in your app. If you want to confirm layout adaptation, rotating with the toolbar is enough. If you want deterministic automated tests, use adb or instrumented tests that change orientation explicitly.
Also remember that tablets, foldables, and resizable emulator devices can expose layout issues that simple portrait-to-landscape switching will not catch. Orientation is only one part of configuration testing.
That is especially true for modern Android UIs built with adaptive layouts. A screen can survive a basic rotation test and still fail when width classes or multi-window constraints change.
Common Pitfalls
- Rotating the emulator while the Android system still has auto-rotate locked off.
- Expecting an activity to rotate when the manifest pins it to portrait or landscape.
- Confusing emulator device rotation with app-level configuration handling.
- Relying on old shortcut assumptions instead of checking the current emulator help pane.
- Testing only phone portrait and landscape when the real layout bugs appear on larger or resizable displays.
Summary
- Use the emulator’s rotate controls first to simulate a normal device rotation.
- If nothing changes, check whether Android auto-rotate is disabled.
- '
adb shell settingscommands are useful for repeatable orientation tests.' - App manifest settings can intentionally block rotation even when the emulator rotates.
- Good orientation testing covers both device rotation and how the app responds to configuration changes.

