Tosh
Tosh

Reputation: 71

Android Studio emulator reverse landscape orientation

I am working on an app in Android Studio and couldn't find a way to test reverse landscape in the emulator. (I don't own an Android device so that is not an option.) Is there some way to do this or does the emulator not have this function?

EDIT: I know the keyboard command for orientation but it only toggles standard layout. I wanted to know if there was a way to set emulator in reverse layouts.

Upvotes: 1

Views: 598

Answers (1)

Alex
Alex

Reputation: 713

This help me Changing Android Device orientation with ADB

So first run

adb shell content insert --uri content://settings/system --bind name:s:accelerometer_rotation --bind value:i:0

Than for:

PORTRAIT

adb shell content insert --uri content://settings/system --bind name:s:user_rotation --bind value:i:0

REVERSE_LANDSCAPE

adb shell content insert --uri content://settings/system --bind name:s:user_rotation --bind value:i:1

REVERSE_PORTRAIT

adb shell content insert --uri content://settings/system --bind name:s:user_rotation --bind value:i:2

LANDSCAPE

adb shell content insert --uri content://settings/system --bind name:s:user_rotation --bind value:i:3

Upvotes: 1

Related Questions