Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

Share this Page URL
Help

Chapter 4. Getting the pixels perfect > Creating portable user interfaces - Pg. 144

144 C HAPTER 4 Getting the pixels perfect tool helps you by automatically adding the one-pixel border to an existing image, ren- dering visual guides such as marking the resulting scaling boxes, and by computing live previews of your image scaled in all directions with the current modifications. This section has been all about the visuals. You've seen how to organize your application's view attributes in styles and themes, as well as what drawables are and how to use them to create completely customized, beautiful user interfaces--well, if your design skills are as good as your programming skills. We've talked about scaling images (on a small scale). But what about scaling the entire user interface? Android devices come in various screen sizes, and even the most beautiful user interface will fall apart if it doesn't render correctly on all devices. Therefore, the next section is all about making your application's UI scale with the various kinds of displays and con- figurations that are available now, and even those that aren't available yet! 4.7 Creating portable user interfaces When talking about portability, we can mean different things: portability with respect to software (not all SDK functions are available on all handsets) or hardware capabilities (not every Android device has a light sensor or hardware keyboard). In this section, we'll talk about portability and scalability with respect to user interfaces and screen sizes. We started developing for the Android platform in its early Alpha days, when there wasn't a single device that would run the platform... unless you count the Nokia Inter-