Resolution independence

When you develop apps for mobile devices, it's important to consider the screen resolution of the device you're targeting. Many aspects of your UI, such as the arrangement of UI controls and the appearance of image assets, can depend on resolution. If your target platform includes devices with different resolutions (as BlackBerry 10 does), your apps should be able to adapt to these resolutions so they always look their best and reach the largest number of users.

Screen resolutions in BlackBerry 10

Devices running BlackBerry 10 are available in several screen resolutions:

A comparison of device resolutions.

As you develop your apps, you should try to create your UIs so that they look good and work correctly in any resolution.

Making your UI resolution-independent

There are several ways you can achieve a resolution-independent UI. You can use relative layouts that Cascades provides, and you can use properties such as margins and space quotas to preserve the spacing between your controls. You can also take advantage of nine-slice scaling for your images, which lets your images grow or shrink to fit the space that's available to it. You should also learn about the static asset selector that's included in Cascades, which automatically selects the best set of project assets to use based on the resolution of your target device.

The UI for your app isn't the only visual component that you need to consider when making your app resolution independent - like the device screen itself, Active Frames also come in different sizes. For information about the different sizes of Active Frames for each device, see Active Frames in the UI Guidelines. You must also make sure that your application icons are the correct size for each device that your app targets. To learn more about app icon sizes, see Application icons.

You can visit the links below to learn more about these approaches and how to apply them in your apps.

Last modified: 2013-12-21

comments powered by Disqus