Should we replace Action Bar by ToolBar?

后端 未结 10 1525
日久生厌
日久生厌 2020-12-12 19:11

I have been using ToolBar since it was added into Support v7 library. And I think I used it well. But there is a point I can\'t understand. Why

10条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-12 19:35

    Here is the documentation link -- http://developer.android.com/training/appbar/setting-up.html

    Note that it doesn't include the code where you include it in your other layout files:

    
    

    Why I changed to Toolbar -- One of the reasons I changed a recent app to Toolbar was that when we wanted to customise the action bar, it wouldn't work on different Android versions or when we extended certain classes (making it transparent or showing an icon instead of the app name). Toolbars have allowed us the customisation options we want.

提交回复
热议问题