I'm trying to make a toolbar with a bold header and set it a white color and a blue background. Only the blue background is displayed successfully. I can't understand why the header styles don't change
<style name="CustomText">
<item name="android:textStyle">bold</item>
<item name="android:textColor">@color/white</item>
</style>
<style name="CustomToolbar" parent="Widget.Material3.Toolbar">
<item name="android:background">#03A9F4</item>
<item name="titleTextStyle">@style/CustomText</item>
</style>
<style name="Base.Theme.Workshop2" parent="Theme.Material3.DayNight">
<!-- Customize your light theme here. -->
<item name="toolbarStyle">@style/CustomToolbar</item>
<item name="colorPrimaryDark">#03A9F4</item>
<!-- <item name="colorPrimary">@color/my_light_primary</item> -->
</style>
You need to specify that your
CustomText
style item is parented byTextAppearance.Material3.Title.Large
, or else Android won't recognize it as a Material3-themeable item.Changing your style file in this way will do the trick: