13 The Toolbar

A key component of any well-designed Android app is the toolbar. The toolbar includes actions that the user can take, a new mechanism for navigation, and also provides design consistency and branding.

In this chapter, you will create a menu for CriminalIntent that will be displayed in the toolbar. This menu will have an action item that lets users add a new crime. You will also enable the Up button in the toolbar (Figure 13.1).

Figure 13.1  CriminalIntent’s toolbar

CriminalIntent’s toolbar

AppCompat

The toolbar component is a new addition to Android as of Android 5.0 (Lollipop). Prior to Lollipop, the action bar was the ...

Get Android Programming: The Big Nerd Ranch Guide, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.