

Multiple distinct Toolbar elements can be defined within a single activity.As a regular View, the toolbar is easier to position, animate and control.Toolbar is a View included in a layout like any other View.The key differences that distinguish the Toolbar from the ActionBar include: The Toolbar is a generalization of the ActionBar system. Use a standalone Toolbar when you want to use the pattern in your app for situations that an Action Bar would not support for example, showing multiple toolbars on the screen, spanning only part of the width, and so on.Use a Toolbar as an Action Bar when you want to use the existing ActionBar facilities (such as menu inflation and selection, ActionBarDrawerToggle, and so on) but want to have more control over its appearance.In AppCompat, Toolbar is implemented in the class.ura


However, Android has updated the AppCompat support libraries so the Toolbar can be used on lower Android OS devices as well. Toolbar works well with apps targeted to API 21 and above. Toolbar's appearance and behavior can be more easily customized than the ActionBar. It's a ViewGroup that can be placed anywhere in your XML layouts. Toolbar was introduced in Android Lollipop, API 21 release and is the spiritual successor of the ActionBar.
