If you do not already have this namespace attribute in your layout file, add it:
XMLNS: application = "http://schemas.android.com/apk/res-auto"
Update the toolbar attributes in the layout file as follows:
<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/myToolbar" android:layout_width="match_parent" android:layout_height="wrap_content" app:titleTextAppearance="@style/ToolbarTitleAppearance" app:subtitleTextAppearance="@style/ToolbarSubtitleAppearance" android:minHeight="?attr/actionBarSize"> </android.support.v7.widget.Toolbar>
Add styles like these:
<style name="ToolbarTitleAppearance" parent="@style/TextAppearance.Widget.AppCompat.Toolbar.Title"> <item name="android:textSize">20dp</item> </style> <style name="ToolbarSubtitleAppearance" parent="@style/TextAppearance.Widget.AppCompat.Toolbar.Subtitle"> <item name="android:textSize">14dp</item> </style>
source share