The app-bar
Android applications have always contained a toolbar at the top of the screen. This was traditionally used to provide a title along with access to a top-level menu, and was called the action bar. Since Android 5 (API level 21) and the inception of material design, it has been possible to replace this with the far more flexible app-bar. The app bar allows us to set its color, place it anywhere on the screen, and include a wider range of content than its predecessor.
Most Android Studio templates use themes that include the old action bar as default, and the first thing we will need to do is remove the old version. To see how we remove the old action bar and replace it with a customized app-bar, follow these steps:
Start a new Android project using an empty activity template and set your material theme using the theme editor.
Open the
styles.xml
file and edit thestyle
definition to match the one here:<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
Create...