Skip to main content
Participant
February 21, 2012
Question

Cannot force max width height for app

  • February 21, 2012
  • 2 replies
  • 992 views

Hi

No matter what I set in my app's xml file it will always resize to the device width/height.  At this stage we are only supporting iPhone 4 resolution (480x320), so if the app is installed on iPad it should be presented at 480x320 (we are landscape only).  I'm not how and where to set this?  The initial splash screen displays correctly but once the app has loaded it then reverts to fullscreen.  Setting fullscreen to false enables the info bar at the top but the app is still presented at the native iPad resolution.


Thanks for any input.

Ben

This topic has been closed for replies.

2 replies

February 21, 2012

Try adding this piece of code on your first frame.

stage.scaleMode = StageScaleMode.NO_SCALE;

stage.align = StageAlign.TOP_LEFT;

This turns off the Flash auto scale and resets x and y.

Colin Holgate
Inspiring
February 21, 2012

That is a separate issue, and wouldn't be the best solution anyway, because it would leave a 480x320 area in the top left of the landscape iPad screen.

February 21, 2012

He can then center it but yeah what Colin is saying I believe is if you set it to publish for iPhone only it will then just put a small 320 x 480 window in the middle of your iPad that you can then upsize but you are probably publishing for iPad and iPhone and its sizing accordingly.

Colin Holgate
Inspiring
February 21, 2012

In the app descriptor you can set which devices are to be used. If you set it to know devices 1 and 2, then it will fill the screen on the iPad. If you only set it to know device 1, it will show as a little area in the middle of the iPad screen, with the 2X button for the user to use if they wish.

Look for this line:

</InfoAdditions

Participant
February 22, 2012

Thanks Colin.  That did the trick!  Is there a similar setting for Android or is it handled differently?  I knew I was after the "2x zoom" functionality in iOS, but I wouldn't have guessed removing the device family type would achieve this.

Thanks

Ben

Colin Holgate
Inspiring
February 22, 2012

Since Android 3.2 there has been an option for the user to choose whether an app zooms to fill the screen, or whether the real estate just increases. That's on the same lines, but it's not under your control. Overall, I would just not worry about what happens on large Android devices, hopefully those users can cope.