Chapter 1

Laying Out Your Stuff

In This Chapter

check1 Organizing the widgets on the device’s screen

check1 Dealing with colors, sizes, and positions

check1 Working with various layouts

Which description do you prefer?

  • In my entire line of sight, I see a polygon with convex vertices at the points (1.5, 0), (0, 1.2), (3, 1.2), (0.6, 3), (2.4, 3), and with concave vertices at the points (1.15, 1.2), (1.85, 1.2), (0.95, 1.8), (2.05, 1.8), (1.5, 2.2). The units are in inches.
  • In my entire line of sight, I see a five-pointed star.

The first description is more precise, but the first is also more brittle. As I type this introduction, I anticipate the email messages from readers: “You got one of the numbers wrong in the first description.”

The second description is also more versatile. The second description makes sense whether you describe an image on a laptop screen or on a highway billboard. In a world with all kinds of mobile devices, all kinds of screen sizes, screen resolutions, display qualities, refresh rates, and who-knows-what-other variations, the big picture is often more useful than the picky details. When you describe your app’s screen, you should avoid measurements in favor of concepts. ...

Get Android Application Development All-in-One For Dummies, 2nd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.