Search code examples
androidandroid-toolbarnavigationviewmaterial-componentsmaterial-components-android

Is this possible to set hamburger menu below of Toolbar in NavigationView?


i want to change menu icon below of toolbar. Is this possible to change the icon position. Thanks in advance

[please find the image [1]


Solution

  • You can use app:buttonGravity attribute to change the gravity of the buttons in the Toolbar and use a custom height.

    Something like:

    <com.google.android.material.appbar.MaterialToolbar
        android:layout_height="...dp"
        app:buttonGravity="center_vertical"
        ../>
    

    enter image description here

    It can work also with the androidx.appcompat.widget.Toolbar.