Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

how disabling auto rotate screen thru code?

Thank you! I'll update.

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

how disabling auto rotate screen thru code?

Hi Marie,

Did you change codescreenOrientation="landscape"/code to codescreenOrientation="portrait"/code in one place only? In Androidmanifest.xml you would need to replace it three times.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

how disabling auto rotate screen thru code?

Hello!
Sorry for misunderstanding.
1) Delete AndroidManifest.xml file
2) Undo all source changes on Android folder
3) You need to add android:screenOrientation="portrait" for one activity only (android:name=".PhoneGapActivity")
4) For activity android:name=".PhoneGapActivity" you have preandroid:configChanges="orientation|keyboardHidden|screenSize"/pre Please delete screenSize so that it looks like this preandroid:configChanges="orientation|keyboardHidden"/pre

marieall
Posts: 0
Joined: Thu Oct 03, 2013 4:10 pm

how disabling auto rotate screen thru code?

Hi Maryna,

Actually while waiting for your answer I tested one by one what I changed on AndroidManifest.xml and it finally worked!
But in the end I added the line of code under each activity. I also didn't delete "screenSize".

Knowing everything is correct, do you think i should leave it like I did or correct from what you said?

It is now published on Google Play :)
https://play.google.com/store/apps/de...

Next step : App Store !

Thanks for all your help (you other appery employees!)

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

how disabling auto rotate screen thru code?

Hello!
It's not necessary to do exactly the way we suggested. You can leave as it is if it works for you.
Good luck with App Store!

Return to “Issues”