As noted in one comment, padding is reserved for the up icon. The gasket is present even if the up icon is not displayed (so that the logo does not move when you hide / show the icon up). Using the action bar (and ActionBarSherlock ), there are basically 2 ways to remove a space:
1. Delete icon
The size of the up icon affects the left fill, if you place a larger image there than an arrow, the gap will be larger. If you delete it, the abyss is gone. Remember that removing the up icon may not bring the exact look. The icon and logo up partially overlap (the icon at the top has a negative right margin), so removing the icon up (does not actually set the image to nowhere, does not affect visibility) may cause the logo to be partially hidden behind the left edge of the screen.
To remove the icon up icon android:homeAsUpIndicator to @null .
<style name="MyTheme" parent="@style/Theme.Sherlock"> <item name="homeAsUpIndicator">@null</item> <item name="android:homeAsUpIndicator">@null</item> </style>
2. Hide the original layout and use a custom view instead
This way it works more, but you can better influence the result. You will need to place the icon and title in the user view. To hide the home layout and show the custom, you must set android:displayOptions in the style of the action bar. And then set the correct custom view in the code (you can also set it in styles, but it doesnโt work in this way).
<style name="MyTheme" parent="@style/Theme.Sherlock"> <item name="actionBarStyle">@style/MyActionBarStyle</item> <item name="android:actionBarStyle">@style/MyActionBarStyle</item> </style> <style name="MyActionBarStyle" parent="@style/Widget.Sherlock.ActionBar"> <item name="displayOptions">showCustom</item> <item name="android:displayOptions">showCustom</item> </style>
Tomik source share