Chapter 11. Advanced Navigation

By now, you have just about all the major building blocks necessary to build a basic application. But sometimes, the basic building blocks just aren’t fun enough. This chapter gives you a basic overview of two of the most common navigational paradigms, the view pager and the navigation drawer.

The View Pager

A view pager is a way of navigating left and right through pages of data, generally using the swipe left and swipe right gestures. A view pager, like a list, takes an adapter, called a PagerAdapter, to generate the content to show. Two subclasses are built into the support library for the PagerAdapter: FragmentPagerAdapter and FragmentStatePagerAdapter. Both essentially accomplish the same thing—they show ...

Get Beginning Android Programming: Develop and Design now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.