Improving navigation with the ActionBar
Beginning at API Level 11 (Android 3.0), Android moved away from using traditional menus to instead use the ActionBar. The ActionBar provides action items that are a combination of button-based actions that appear directly on the ActionBar and menu-based actions that appear in a drop-down list when the user taps on the Action overflow button. The following screenshot shows the available ActionBar actions:
What many developers don't realize is that the button-based and menu-based actions are just a small subset of what the ActionBar actually does. The ActionBar now serves as a central point for many navigation-related behaviors. Two of these behaviors are tied directly to fragments: tab navigation and drop-down navigation.
Note
To incorporate the ActionBar in applications targeting versions of Android with an API Level below 11, use the ActionBarCompat
class available in the Android Support Library. For more information on the ActionBarCompat
class visit...