Extended Toolbar with Custom View not Displaying with Full Width

后端 未结 3 2002
眼角桃花
眼角桃花 2021-02-03 12:45

I went through lots of answers here related to Toolbar but none of the answers could help me.

What I\'m trying to achieve is to have an extended toolbar whhich will disp

3条回答
  •  我在风中等你
    2021-02-03 13:20

    So in order to achieve this and have complete control over the padding in the toolbar I created two toolbars. The first toolbar with standard height of 56dp and second with height of 72dp which together made a double layered toolbar as specified by material design.

    And because I am not inflating any menu items in the second toolbar all my cusotm views inside behave as desired.

    These lines still need to be used though

        app:contentInsetStart="0dp"
        app:contentInsetEnd="0dp"
        app:contentInsetLeft="0dp"
        app:contentInsetRight="0dp"
        android:clipToPadding="false"
    

    This solved my issue so now I'm including two toolbars into my XMl.

提交回复
热议问题