01-13-2011 05:41 PM
Hey Guys (and Gals),
So yesterday when we first got the SDK me and harry noticed an orientation issue. To be honest I couldn't even rotate the device in the simulator (later found out about the click and drag). Anyways, my current app was being built assuming we wouldn't see any rotation capabilities in the simulator till later. But now that we received the updated simulator we can finally do some rotation tests. So here is what we observed:
After adding the following lines to the -app.xml file:
I compile and run my application in debug mode into the simulator. Runs without a hitch. I do the click and drag motion to rotate the simulator. Doesn't work. Now I am going to assume that this happens because I set the autoOrient value to false. So now so far so good. If the user decides to rotate the device while using my app it'd stay the same (i was planning on doing the portrait mode edits later).
so what's the problem. After I swipe up on my application to minimize it while still in landscape mode it shows up as a normal horizontal app. Now if I were to do the click and drag motion to rotate the simulator the simulator rotates - but not my app. Now because it was rotated while being minimized my app is still assuming the device is in landscape mode and remains the same form. Now when i maximize my app while still in portrait mode it looks pretty bad to say the least. a landscape app in portrait form factor - not a pretty picture.
In case I have anyone scratching their heads, here are steps to re-create (this is all assuming your app is set to only show in landscape mode):
If you followed those steps in that order you should be able to now understand if you didn't already before.
so my question is, is the same behaviour expected from the actual device? or will a minimized landscape only application be rotated to still be in "landscape" mode and not stretched to fit portrait mode?
Thanks for any information / suggestion / collaboration effort in advance!
(btw while typing this a workaround came to mind where i could check to see the current ratio of height and width of the stage and do the orientation myself - i'll keep you posted!)
Solved! Go to Solution.
01-13-2011 06:22 PM
i believe the same workaround is shown in this video:
Seems like a BB issue to me so let's hope they fix these soon
01-13-2011 06:33 PM
thanks for the reply and link! i didnt realize there was already a thread about this (still cant find it). must've been lost in the slew of threads from yesterday's revealing of the new SDK haha. i did the work around shown in the video before but the problem remains that half my application is cutoff once maximized. i assumed it'd be rotated to preserve the original layout.
what i have tried was detect the rotation and rotate the entire application, however, what i came to realize (and was kind of already fearing it would happen) is since my fonts are not embedded, they will not show up once rotated.
so my choices are wait for the fix, create a portrait version of my app, or embed the fonts and see where that leads (seems like a dark alley haha).
01-13-2011 06:39 PM
Same here, i'm just going to wait. It's working perfectly in Android (sim and device) so there i'm not going to write code to fix something that will be fixed when it will be released (they can't leave it like that)
01-13-2011 06:42 PM
ah ok. just to confirm what you said, so on androids if you do the landscape lock in via -app.xml as described above, it will keep your application laid out as it was orginally if the device is rotated? meaning your app is rotated but still remains unchanged, undistorted, and full screen?
01-13-2011 06:43 PM
Yup that's right
01-13-2011 06:47 PM
Very cool. So then im going to let this slide to the back of my mind for now and can continue with core functionality. thanks again fnicollet!