ActionBar
A primary toolbar within the activity that may display the activity title, application-level navigation affordances, and other interactive items.
The action bar appears at the top of an activity's window when the activity uses the AppCompat's AppCompat theme (or one of its descendant themes). You may otherwise add the action bar by calling requestFeature(FEATURE_SUPPORT_ACTION_BAR) or by declaring it in a custom theme with the windowActionBar property.
The action bar may be represented by any Toolbar widget within the application layout. The application may signal to the Activity which Toolbar should be treated as the Activity's action bar. Activities that use this feature should use one of the supplied .NoActionBar
themes, set the windowActionBar attribute to false
or otherwise not request the window feature.
If your activity has an options menu, you can make select items accessible directly from the action bar as "action items". You can also modify various characteristics of the action bar or remove it completely.
The navigation button (formerly "Home") takes over the space previously occupied by the application icon. Apps wishing to express a stronger branding should use their brand colors heavily in the action bar and other application chrome or use a logo in place of their standard title text.
From your activity, you can retrieve an instance of ActionBar by calling getSupportActionBar getSupportActionBar()}.
In some cases, the action bar may be overlayed by another bar that enables contextual actions, using an ActionMode. For example, when the user selects one or more items in your activity, you can enable an action mode that offers actions specific to the selected items, with a UI that temporarily replaces the action bar. Although the UI may occupy the same space, the ActionMode APIs are distinct and independent from those for ActionBar.