3

How can I use MonkeyRunner to switch the screen mode(Portrait mode and Landscape mode)?

Nightfirecat
  • 11,432
  • 6
  • 35
  • 51
Martin
  • 57
  • 4

3 Answers3

1

There is a indirect way,you can toggle between portrain & landscape, but only the setting page.Steps:-

1.Disable auto-rotate screen option in settings page,keep the same page open.
2.Keep device in horizontally(It wont go to landscape mode as auto rotate is disabled
3.Get coordinates of disable/enable by enabling 'show pointer location'
4.touch the cordinates using monkeyrunner-it will goto landscape,touch again it will goback to portrait.

Rilwan
  • 2,251
  • 2
  • 19
  • 28
1

There is no such way.

Nightfirecat
  • 11,432
  • 6
  • 35
  • 51
Android Boy
  • 4,335
  • 6
  • 30
  • 58
0

If its a physical device then I do not know of a way to change the screen mode without actually physically putting the device on its side.

n8schloss
  • 2,723
  • 2
  • 19
  • 27