Search code examples
androidandroid-studioandroid-emulatorandroid-virtual-devicescreen-rotation

Android Studio API Level 28: Rotating emulator does not rotate the app contents or device UI


Foreword. I know this question has been asked several times in the past, but none of the solutions have actually worked for me. It's also been several years since a similar question has been asked (according to a time-filtered Google search), so most of the older answers are outdated. If there's any way I can edit the question to be clearer, please let me know.

Problem. When I click either of the rotation buttons, the emulator itself rotates, but the user interface and app contents do not get redrawn accordingly, such that I have to tilt my head (defeating the purpose of rotating the device).

Specifications

  • Android Studio 3.2
  • Android SDK 9.0 (Pie)
  • Nexus 5X API 28 (I've tried other devices, but the issue persists)
  • I do not have any Android Manifest orientation attributes set

Screenshots

enter image description here

enter image description here

enter image description here


Solution

  • Make sure auto-rotate is enabled on the virtual device. Pull down the notification bar and look for the Auto-rotate toggle and turn it on. Or, go into Settings->Display->Advanced and make sure Auto-rotate screen is turned on.