Chapter 11

Building Human Interfaces for Data


  • UI conventions for data-oriented apps
  • Scaling the display
  • Combining Tab and Fragment
  • Using the ActionBar
  • Touch and direct manipulation


Please note that all the code examples in this chapter are available at and as a part of the book’s code download at on the Download Code tab.

Chapter 1 introduced the basics of an application framework. The example code in Chapter 1 showed how to handle an application lifecycle correctly and illustrated good practices in scaling applications to fit many screen sizes.

That basic framework introduced the use of the Fragment class, which enabled the application to spread out across the screen of a tablet and “fold up” to fit on a handset. The framework integrated the use of fragments with tabs in the Action Bar.

Now that you have an application that meets those basic requirements and actually does something, it’s time to upgrade the ease and facility of interaction with that application and to implement a more complete range of Android conventions in the UI.

The users should find the UI obvious, and where it isn’t obvious at first glance, it should be explorable. Users should be able to guess at outcomes with reasonable success. That is, the application should encourage experimentation. It should avoid disappointing the users by having them find that a touch or a gesture ...

Get Enterprise Android: Programming Android Database Applications for the Enterprise now with O’Reilly online learning.

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