page.title=Adding the App Bar page.tags="appbar","actionbar" helpoutsWidget=true trainingnavtop=true startpage=true @jd:body
The app bar, also known as the action bar, is one of the most important design elements in your app's activities, because it provides a visual structure and interactive elements that are familiar to users. Using the app bar makes your app consistent with other Android apps, allowing users to quickly understand how to operate your app and have a great experience. The key functions of the app bar are as follows:
This class describes how to use the v7 appcompat support library's {@link android.support.v7.widget.Toolbar} widget as an app bar. There are other ways to implement an app bar—for example, some themes set up an {@link android.app.ActionBar} as an app bar by default—but using the appcompat {@link android.support.v7.widget.Toolbar} makes it easy to set up an app bar that works on the widest range of devices, and also gives you room to customize your app bar later on as your app develops.