I\'m trying to display my toolbar title in the center and to do it I use the method which is given in this answer :-Toolbar Center title
However, when I enable back butt
The reason why the title is not centered when you use a back button as navigation icon, is that navigation icon is represented as AppCompatImageButton
and is added to the same layout as your title TextView
. Using Arshak's answer is not a bad idea, but ?android:attr/actionBarSize
is not a good way to define the end margin. As the action bar height is probably the same size as icon's width, it might work, but might not work on all devices. Could be a good idea to specify this size from material design guidelines.