Remove large padding after hamburger (menu) icon in Android Toolbar?

后端 未结 2 2001
不思量自难忘°
不思量自难忘° 2020-12-01 18:20

Here is a picture of the large padding gap after the menu icon:

This occurred after not working on my project for a month (summer school). I just came back to it an

相关标签:
2条回答
  • 2020-12-01 18:34

    Add these properties to your Toolbar:

    app:contentInsetLeft="0dp" 
    app:contentInsetStart="0dp" 
    app:contentInsetStartWithNavigation="0dp"
    

    This will disable inset start padding from Toolbar's title

    0 讨论(0)
  • I figured it out! I had to set

    app:contentInsetStartWithNavigation="0dp"

    in my Toolbar layout.

    0 讨论(0)
提交回复
热议问题