04-19-2012 12:29 AM
04-19-2012 08:15 AM - edited 04-19-2012 08:21 AM
What I do:
Splash Screen - make an icon that is smaller than the smallest screen size and has a transparent background, then add the background color in the config.xml, should look good on all screens although the icon is a little smaller.
The rest - use CSS media queries to serve CSS based on that. Each of those would have their own optimized set of graphics (which unfortunately increases the app size). The font size +form fields and button styles can be tweaked in each media query. (edit: I should note that I haven't targeted OS5 in this way so your mileage may vary with it. It does work for OS 6 & 7)
Have a look at this thread for a similar way that loads the CSS based on the phone model http://supportforums.blackberry.com/t5/Web-and-Web
04-19-2012 09:08 AM
I think best feature is CSS media queries + use liquid HTML layout.
I have app for 640x480, but app have a liquid HTML layout.
Only in 5 OS i using background-color for elements, but in 6+ OS I use css3 gradients.
04-19-2012 11:03 AM
Instead of relying on the user agent you can grab the model and OS from the system API
04-19-2012 12:34 PM
04-19-2012 12:59 PM
for the loading screen:
Using background.png, make it a graphic to fit in the smallest screen size you are targeting, lets say 320. Make the grapic 300X300, and make its background transparent when you save it.
Then in your config.xml set the background colour to something that fits your apps colour scheme.
<rim:loadingScreen backgroundColor="#CCCCCC" foregroundImage="background.png" onFirstLaunch="true" </rim:loadingScreen>
What will happen is on devices that have 640X480 screen your background.png will sit in the middle of the screen surrounded by thte background colour you entered. the bigger the screen the more colour you will see.
As for which way of loading CSS is more efficient, I will have to leave that to someone else to answer as I haven't actually done the device check way so I can't be sure.
04-19-2012 01:12 PM
04-19-2012 01:17 PM