Fragments Fundamentals

  • Dave MacLean
  • Satya Komatineni
Chapter

Abstract

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 a large screen), and a separate activity to show an individual e-mail (also filling a large 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

Sample Application Detail Activity Source Code File Initialization Argument Landscape Mode 
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.

Copyright information

© Dave MacLean 2014

Authors and Affiliations

  • Dave MacLean
    • 1
  • Satya Komatineni
    • 1
  1. 1.FLUnited States

Personalised recommendations