After the recent customization of toolbar, it was found that the left side could not be fully populated, always left a little blank, and the workaround was found by viewing the style in the support package for the newly released V7.
View the parent of Wiget.AppCompat.Toolbar, as follows:
<style name= "Base.Widget.AppCompat.Toolbar" parent= "Android:widget" > <item name= "titletextappearance "> @style/textappearance.widget.appcompat.toolbar.title</item> <item name=" Subtitletextappearance "> @style/textappearance.widget.appcompat.toolbar.subtitle</item> <item Name= "Android:minheight" >?attr/actionBarSize</item> <item name= "Titlemargins" >4dp</item > <item name= "maxbuttonheight" >56dp</item> <item name= "Collapseicon" >?attr/ homeasupindicator</item> <item name= "collapsecontentdescription" > @string/abc_toolbar_collapse_ description</item> <item name= "Contentinsetstart" >16dp</item> </style>
Where the Contentinsetstart attribute is the reason why the custom Actionbar cannot be fully populated.
Workaround:
The new style that is defined in Styles.xml inherits from Wiget.AppCompat.Toolbar as follows:
<style name= "Clubtoolbar" parent= "Widget.AppCompat.Toolbar" > <item name= "Contentinsetstart" >0DP </item><!--Set this property to resolve a blank section-- </style>
Then rewrite the Toolbar property in your style.xml apptheme :
<!--Base Application theme. "Noactionbar" hides the original Actionbar Settings toolbar- <style name= "Apptheme" parent= " Theme.AppCompat.Light.NoActionBar "> //... .. <item name= "Toolbarstyle" > @style/clubtoolbar</item> </style>
Android Custom Toolbar/actionbar View left blank