So far, we’ve explored several bits and pieces of an Android application, and you’ve run some simple applications tailored to a smartphone-sized screen. All you had to think about was how to lay out the UI controls on the screen for an activity, and how one activity flowed to the next, and so on. For the first two major releases of Android, small screens were it. Then came the Android tablets: devices with screen sizes of 10″. And that complicated things. Why? Because now there was so much screen real estate that a simple activity had a hard time filling a screen while at the same time keeping to a single function. It no longer made sense to have an e-mail application that showed only headers in one activity (filling the screen), and a separate activity to show an individual e-mail (also filling the screen). With that much room to work with, an application could show a list of e-mail headers down the left side of the screen and the selected e-mail contents on the right side of the screen. Could it be done in a single activity with a single layout? Well, yes, but you couldn’t reuse that activity or layout for any of the smaller-screen devices.
KeywordsAndroid Application Initialization Argument Object Animator Landscape Mode Public Void
Unable to display preview. Download preview PDF.