I\'m trying to figure out the right way to use a custom font for the toolbar title, and center it in the toolbar (client requirement).
At the moment, i\'m using the
You can have a custom TextView
in the toolbar like this:
So, this will center the text. If you want to add custom font to a normal Toolbar
, make a :
And add it to the toolbar:
toolbar.setTitleTextAppearance(this, R.style.ToolbarFont);
For the textview in the toolbar, you can define it with the fontFamily
attribute: