Should we replace Action Bar by ToolBar?

后端 未结 10 1496
日久生厌
日久生厌 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:33

    Note: Both will support general app navigation, icons and have backward support.

    The answer depends on what user interaction(animating toolbar) your designs calls for. That being said you should implement animations on the toolbar to make it Material.


    ActionBar:

    If you simply want a static bar at the top that can host icons, back button and you can theme.

    Toolbar:

    If you want to do anything beyond a static bar such as animations.

    A common implementation and Google design recommendation is to hide the toolbar when scrolling. Material Design checklist: hiding app bar on scroll?

提交回复
热议问题