Flex Size and Scaling Issues on the Motorola Atrix

As more and more devices come out, we on the Flex team have occasionally seen platform-specific or device-specific bugs. One of the more visible ones is when flash.system.Capabilities.screenDPI reports the wrong value.

Flex Mobile applications use the screenDPI property for application scaling (when setting the applicationDPI property) or when choosing density-specific skins (i.e. not using the applicationDPI property). When this value is wrong, Flex component skins and layout will either be too big or too small for the screen.

Unfortunately, the Motorola Atrix with AIR 2.6 is incorrectly classified as a 160 DPI device. What you’ll see when running your application is that component skins are too small. The bug is logged as SDK-29999.

Luckily, Flex 4.5 provides a way to override the DPI classification at runtime. The spec for this is posted at http://opensource.adobe.com/wiki/display/flexsdk/Override+Default+Density+Mapping.

For the Atrix in particluar, we’ve attached a workaround to bug SDK-29999 and I’ve posted an example FXP project here. The AIR bug will be fixed in a future release of AIR.

Download: SDK29999.fxp

Share on Facebook