简体   繁体   中英

How to disable orientation change in AIR SDK for Android using Intellij IDEA

I am developing an AIR application (no flex, pure as3) for Android in Intellij IDEA, but I cannot find a way to disable orientation change. I remember when I was using flex builder, I could just tick a checkbox somewhere in the preferences and it updated the descriptor XML file with some lines. I cannot find the necessary lines and the actual XML file though.

How can be the orientation locked in portrait?

Thanks

Open "YourAppname-app.xml" in the default src folder. Search for "autoOrients" and set it's value to "false". Then go for "aspectRatio" and set it to "portrait".

Some of the values might be commented out, so you might need to remove the comment around it first.

Silly me.

It is a little bit cryptic, but here's how you do it:

  1. Go to File > Project Structure ( cmd + ; on Mac)
  2. Select Modules on the left pane
  3. Choose your project (It will say something like "Project name (app)"
  4. Select Android or iOS tab, depending on what you want to create a descriptor file for
  5. Select Custom template
  6. Press Create button
  7. Select all your needed options, press Create and that's it!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM