O'Reilly logo

Beginning Android Programming: Develop and Design by Kevin Grant, Chris Haseman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required