Auriwield Auriwield - 2 months ago 11
Android Question

How to decrease padding between title an subtitle in toolbar

Does anybody know how to decrease the pading between the title and subtitle in the toolbar?

I'm using an AppCompatActivity toolbar and setting title and subtitle through the following methods:


toolbar.setTitle("Title");
toolbar.setSubtitle("Subtitle");

Answer

One way to do this is to disable toolbar title display and create your own toolbar layout.

getSupportActionBar().setDisplayShowTitleEnabled(false);

This way you will have full control over paddings, style etc.