Landscape rotation

Monkey Targets Forums/Android/Landscape rotation

SLotman(Posted 2015) [#1]
Just something I just discovered - my game on Android wouldn't rotate to landscape left or landscape right, it would be stuck on landscape left.

The trick is to change the manifest from

android:screenOrientation = "landscape"


to

android:screenOrientation = "sensorLandscape"


And that's it! Hope it helps someone else :)

Edit: Probably defining this in code will work too, I didn't test it:
#ANDROID_SCREEN_ORIENTATION="sensorLandscape"



Arabia(Posted 2015) [#2]
Not that I've release an App - but this is really helpful. Sometimes I just like holding my iPad or Android device in a certain way when it's plugged into the external power - Apps that that don't allow you to turn the device to the way that best suits you holding it can be really annoying. Great tip.


therevills(Posted 2015) [#3]
Cool - never knew that!


jayparker(Posted 2015) [#4]
Just was wondering how this should be done in Monkey. Thanks SLotman!

I made a test and you don't need to change manifest, just put this on your monkey code:
#ANDROID_SCREEN_ORIENTATION="sensorLandscape"



dawlane(Posted 2015) [#5]
This was mentioned around 2 years ago and it was Arabia that did the asking.
http://www.monkey-x.com/Community/posts.php?topic=6201&post=71161&view=all#71161

Maybe it's about time that there was a dedicated solutions/tips section for each of the devices.


Arabia(Posted 2015) [#6]
This was mentioned around 2 years ago and it was Arabia that did the asking.
http://www.monkey-x.com/Community/posts.php?topic=6201&post=71161&view=all#71161

Maybe it's about time that there was a dedicated solutions/tips section for each of the devices.


I don't remember 2 days ago let alone 1 year ago :)