Reputation: 71
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
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