Creating Content for Multiple Screens

0
107

To make your application universal, create the core code once and write the environment detection and presentation-specific code on top.

Android 1.6 and later provide support for multiple screens and resolutions. Even though AIR does not have access to Android compatibility features, it is insightful to understand this approach.

The platform divides screen sizes and resolutions into three general sizes: large, normal, and small. Applications provide images or layouts and the sizes they support as part of the manifest file. Android stores the files in folders named drawable and uses the appropriate size based on the device dimension and dpi. If a size is missing, it uses what is available and scales it up or down as needed. If the manifest file declares that multiple screen support is not available, the platform may display the application at medium size on a black background.

For more information, review the Android documentation provided at http://developer.android.com/guide/practices/screens_support.html and http://developer.android.com/guide/topics/resources/index.html.

Flash Builder provides dynamic layout capabilities to manage pixel-level differences in screen resolution and orientation. It offers a scaling mechanism to handle different pixel densities across devices. Existing components have new skins and functionality designed for mobile form factors. New components are added to support mobile-specific
UI patterns. The entire application is scaled automatically, and its font size adjusted, if the application property authorDensity is set to true. More information on this is available at http://labs.adobe.com/technologies/flexsdk_hero/samples/.