Thank you for visiting the BlackBerry Support Community Forums.
BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)
BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.
"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."
- Kevin Michaluk, Founder, CrackBerry.com
Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.
03-28-2011 03:40 AM
Hi, I have seen lots of people talking about app orientation, and how to get it to work. I've tried many ways last night, but couldn't get anything to work properly.
I've locked my apps to always be landscape for the meantime, and this seems to work well, but I'd like to have them working both ways, but can't get it to scale properly, as when I change orientation to portrait, my app simply crops in half.
I'm wondering if anyone has any definitive way of doing it, and if anyone could give me some tips on how to accomplish it.
With kindest regards,
03-28-2011 10:34 AM
For the apps I've done, I completely reposition all of the elements on the screen so that it looks nice in that orientation. I was never happy with the scaling when I saw it.
Generally, I create all of the elements in a constructor nd then call a Layout method which positions them based on the current orientation.
03-28-2011 12:17 PM
There is seldom only one way to do something. You can use the autoscaling, but like I said, I wasn't happy with it when I saw it. I think your original post was asking how to scale it properly, and I can't really answer that since I didn't actually do it that way. I THINK its just a matter to setting the auto scale to true in your XML file, but it sound slike you've tried that and aren't happy with it.
03-28-2011 02:17 PM
My app is 600 x 600 so it can sit comfortably in the middle of the screen in either orientation. I set scaling to NO_SCALE and alignment to TOP_LEFT. then use an event listener for the screen resize event to position the app in the middle of the stage. The one I am working on now will do the same thing. The one after that will require two different screen layouts depending on the orientation, and so I'll have a routine to re-position the necessary elements on the change. Depends a lot on what you are trying to do.