How to use the extended height panel with menu navigation and vertical centers?

I would like to have a custom elevation toolbar that has centered buttons and navigation, but I can't get it to work. I am using this sample layout:

<Toolbar android:id="@+id/toolbar_regular" android:background="#777" android:layout_width="300dp" android:layout_height="100dp" /> 

And it looks like this:

Extended Height Toolbar With Uncentered Buttons

+5
source share
1 answer

In dialog mode on G + with Chris Banes, you can use minHeight to determine the limited height for actions and buttons. Is this default value equal to? Attr / actionBarSize on the toolbar. So I used the layout

 <Toolbar android:id="@+id/toolbar_regular" android:background="#777" android:minHeight="100dp" android:layout_width="300dp" android:layout_height="100dp" /> 

to get this view:

Extended Height Toolbar With Uncentered Buttons

+8
source

Source: https://habr.com/ru/post/1205218/


All Articles