Removing the left margin from the box icon for Android navigation

Can someone help me find a way to remove the left edge of the navigation box icon (indicated by the red box below)? I use the toolbar here.

enter image description here

+6
source share
1 answer

This removes the left margin from the toolbar.

mainToolbar.setContentInsetsAbsolute(0, 0); 

Or you can set the left insert to 0dp in the xml toolbar:

 android:contentInsetLeft="0dp" 

Another way is to define this addition in styles.xml:

 <style name="ToolbarStyle" parent="@style/Widget.AppCompat.Toolbar"> <item name="contentInsetStart">0dp</item> <item name="android:contentInsetStart">0dp</item> </style> 

If all these solutions do not work, check to see if the image has its own add-on.

0
source

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


All Articles