Currently, I'm in the process of migrating a holo designed app to material designed app.
I came across the following article : http://android-developers.blogspot.com/2014/10/appcompat-v21-material-design-for-pre.html
In this release, Android introduces a new Toolbar widget. This is a generalization of the Action Bar pattern that gives you much more control and flexibility. Toolbar is a view in your hierarchy just like any other, making it easier to interleave with the rest of your views, animate it, and react to scroll events. You can also set it as your Activity’s action bar, meaning that your standard options menu actions will be display within it.
The above text doesn't seem clear to me. My first impression is that.
Toolbar
is more powerful thanActionBar
. It can do all whatActionBar
can do, yet provide some other extra functionality.- Google seems to want to promote
Toolbar
overActionBar
I was wondering, how can we decide, whether when should we use ActionBar
, and when should we use Toolbar
.
What I want to achieve is something similar to latest Google Play Store app.
Navigation drawer is under action bar
There is collapseActionView
I can specific my menu as
<item
android:id="@+id/menu_search"
android:title="@string/menu_search"
android:showAsAction="always|collapseActionView"
android:actionLayout="@layout/collapsible_searchtext"
android:icon="?attr/actionBarSearchIcon"/>
I came across latest Google Play Newsstand
Navigation drawer covers over action bar
- If I want feature Navigation drawer covers over action bar, is
Toolbar
is a must? - If I want to have only feature Navigation drawer is under action bar and There is collapseActionView, willl
ActionBar
be sufficient enough?