Advertisement

Pro Android 4 pp 229-260 | Cite as

Fragments for Tablets and More

  • Satya Komatineni
  • Dave MacLean

Abstract

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.

Keywords

Android Application Initialization Argument Object Animator Landscape Mode Public Void 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Satya Komatineni and Dave MacLean 2012

Authors and Affiliations

  • Satya Komatineni
  • Dave MacLean

There are no affiliations available

Personalised recommendations