|
Post by melonzgz on May 10, 2016 21:48:42 GMT 1
I don't know if this is the correct place, but if you're making a game in landscape mode, add this to the manifest:
SetActivityAttribute(Main, android:configChanges, "orientation|keyboardHidden|screenSize") Otherwise when the power button is pressed (or the phone is going to sleep) the game restarts. It's been driving me nuts for so long until I've noticed it. I think it's very important, because a lot of games are locked in landscape mode.
|
|
|
Post by ilan on May 11, 2016 10:19:18 GMT 1
Isnt it enough just to set the app to landscape mode?
|
|
|
Post by melonzgz on May 11, 2016 12:20:14 GMT 1
Nope. Or at least not for me (moto g android 5.1) Just do the test and take a look at the logs when pressing power button in an app in portrait (should be called pause and then resume when unlocking the phone), and then take the same app and set it in landscape mode and then, when pressing power button, after pause there is called create and resume. And when unlocking the phone, pause and create are called again.
|
|