6

Can anybody help me to find the way to remove the left margin of the navigation drawer icon (mentioned by red rectangle below )? I am using toolbar here.

enter image description here

Khaled Saifullah
  • 2,279
  • 3
  • 25
  • 26

1 Answers1

0

This removes the left margin from toolbar.

mainToolbar.setContentInsetsAbsolute(0, 0);

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

android:contentInsetLeft="0dp"

Other way is to define that padding in the styles.xml:

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

If all of these solutions didn't worked please check if the image has its own padding..

Oguz Ozcan
  • 1,694
  • 19
  • 26