Styling Toolbar

We can apply styles to the toolbar.

Go to styles.xml file and add a theme that we are gonna apply to toolbar.

Toolbar13

Now link this theme with toolbar in both layout and layout-v21 folders.

Go to toolbar.xml and add theme attribute to the toolbar element. Make sure, you have added app schema (xmlns:app).

Toolbar14

With this theme for our toolbar, if we run the app, toolbar title will show in while color. Let’s check it out:

Toolbar15