Creating a simple photo gallery

The use of the word Gallery is a little misleading, it's really a horizontal row of items with a "single item" selection model. For this example we'll be using the Gallery class for what it does best, displaying thumbnails. However, as you'll see, it's capable of displaying scrolling lists of almost anything. Since a Gallery is a spinner, you work with it in much the same way as a Spinner object or a ListView, that is, with an Adapter.

Get Android User Interface Development now with O’Reilly online learning.

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