android – Action Bar和新引入的工具栏有什么区别?

在Google介绍Material Design之后,我听说过一个名为Toolbar的新widget类。

什么是工具栏,ActionBar和ToolBar之间的确切区别是什么?

我从Android Developers Blog post找到了一个很好的解释。

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.

是的,我们,Android开发人员,需要更多的控制ActionBar,对吧?工具栏只是为它。

换句话说,ActionBar现在变成了一种特殊的工具栏。这是Google’s official Material Design spec document的摘录。

The app bar, formerly known as the action bar in Android, is a special kind of toolbar that’s used for branding, navigation, search, and actions.

更多详细信息,如如何使用工具栏作为ActionBar包括在上面的博客文章。

快乐编码:)

http://stackoverflow.com/questions/27665018/what-is-the-difference-between-action-bar-and-newly-introduced-toolbar

本站文章除注明转载外,均为本站原创或编译
转载请明显位置注明出处:android – Action Bar和新引入的工具栏有什么区别?