Skip to main content
Known Participant
August 2, 2011
Question

PlayBook App to Android App...

  • August 2, 2011
  • 2 replies
  • 349 views

Hi,

I've developed some apps with FB for the Blackberry PlayBook. Now, I'm looking at porting them to Android. The problem I have is that there is many screen sizes for Android.

Do any of you have any tips, or what do you do to make your apps fit all of the screen sizes? What scale mode do you use? Do you make your assets one aspect ratio and leave borders around the app if it doesnt fit perfectly?

Also as this will be my first Android app, do any of you have any tips or anything I should be aware of?

Thanks for any help you can provide!

This topic has been closed for replies.

2 replies

Innovatology
Participating Frequently
August 7, 2011

Are you using Flex & MXML or is it a pure ActionScript project?

Apart from the screen resolution you need to take the screen size into account. A button (or piano key ;-] ) on a Playbook 7" screen at 1024x600 will have a different physical size in centimeters than on a 10" Honeycomb tablet at a similar resolution, and may be harder to hit with your finger. Don't measure in pixels, but measure in cm's, mm;s or inches. Also, be aware that the DPI reported for many Android devices is incorrect and needs to be overruled.

If you're using Flex, this should get you started with scaling and multiple densities:

http://blogs.adobe.com/jasonsj/2011/05/comparing-css-media-queries-vs-application-scaling.html

Or google for Flex Media Queries.

My approach is to use Flex's built-in alignment. I've also found that contrary to Adobe's recommendations, on most modern devices (Playbook and the better Honeycomb tablets), performance is more than adequate to use MXML and vectors to skin most components. I tend to use pure AS only for components that need to be really performant, such as components that are in item renderers of long lists. There is little reason to code a dialog in AS if it only pops up once in a while.

I've also found that using Flash to create vector assets, and embedding them in Flash Builder works quite well. Vectors are easy to scale, and careful use of bitmap caching, object pooling and re-use  helps a lot.

Now, if your app needs to run on older or less powerful hardware (e.g. cheap Android 2.2 tabs), or if it's a fast-moving game where framerate is important, then that's a very different matter. But do test the various approaches on different devices, because all  roads lead to Rome...

Cheers, - Jon -

Inspiring
August 4, 2011

Did you use absolute positions (x,y) or relative (left, right, top, bottom) ? Is it a game or an application?

For an application, I usually use relative positionning and/or TileGroup to place everything the best way on each device...