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.
Asked
Active
Viewed 2,948 times
6
-
is the drawer icon 16dp form the left? – Raghunandan May 18 '15 at 10:55
-
2possible duplicate of http://stackoverflow.com/questions/27354812/android-remove-left-margin-from-actionbars-custom-layout – Ahmed Hegazy May 18 '15 at 11:02
-
I don't know. How can I find that out? – Khaled Saifullah May 18 '15 at 11:03
-
1This is not a duplicate :) – Jonathan ANTOINE Jan 20 '17 at 09:01
1 Answers
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