DataGreed
DataGreed

Reputation: 13899

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

Upvotes: 0

Views: 111

Answers (2)

DataGreed
DataGreed

Reputation: 13899

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!

Upvotes: 0

T. Richter
T. Richter

Reputation: 369

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.

Upvotes: 1

Related Questions