Skip navigation
Currently Being Moderated

Landscape Orientation - autoOrients Problem

Jul 1, 2011 5:14 PM

I am creating an iOS app that will work only in landscape orientation.  iPad apps that require an orientation must support both variants of that orientation.
I have these lines in my descriptor file:
However because I set autoOrients to true I also get the application show in portrait mode shrieked to fit - with white areas top and bottom.
if i set autoOrients to false it will play only the top right variant of the landscape orientation and not the other way around as well.
Any idea how to resolve this??
  • Currently Being Moderated
    Jul 2, 2011 9:55 AM   in reply to theavi1000

    On iOS, you can listen for the orientaionChanging event and cancel the change if the orientation is changing to one with a portrait aspect ratio. (FWIW, this doesn't work on Android since the orientationChanging event isn't supported by the OS.)

    Mark as:
  • Currently Being Moderated
    Oct 13, 2011 8:50 AM   in reply to theavi1000

    I'd like to resurrect this thread if I may.  I found this article and have used the event.preventDefault() function, and the problem I'm having is that the tab navigation is resizing itself to portrait width when the device is rotated, despite the content and application not rotating.


    I've tried putting a listener on the stage of the tabbedNavigator and duplicating the preventDefault in there, and I've tried stopping the stage's event.RESIZE event, and I've tried overriding the measure() function in the application and forcing the values.


    Nothing works!  What the heck!


    Any help would be appreciated.

    Mark as:
  • Currently Being Moderated
    Dec 26, 2011 7:18 PM   in reply to magic robots

    I have same problem us flex 4.6


    tab navigation is resizing but I want to prevent resize the width, when the device is rotated.( I have already use event.preventDefault() to prevent rotate left and right)

    Mark as:
  • Currently Being Moderated
    Jan 18, 2012 9:50 AM   in reply to JinWYP

    Take a look at tion-change-in-flex-mobile-app - I had exact same problem and was able to find solution that was working for me.

    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points