O'Reilly logo

Pro Android 4 by Satya Komatineni, Dave MacLean

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

List Navigation Action Bar Activity

Because your base classes are carrying the most of the work, it is fairly easy to implement and test the list action bar navigation activity. You need the following additional files to implement this activity:

  • SimpleSpinnerArrayAdapter.java: Needed to set up the list navigation bar along with the listener. This class provides the rows required by a drop-down navigation list (Listing 10–12).
  • ListListener.java: Acts as a listener to the list navigation activity. This class needs to be passed to the action bar when setting it up as a list action bar (Listing 10–13).
  • ListNavigationActionBarActivity.java: Implements the list navigation action bar activity (Listing 10–14).

Once you have these three new files, you ...

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