0

I am using Material Themes in my Android project and am trying to set the Title colour of my app's action bar. The following code works, in my theme file, to set the background colour of the action bar.

<style name="SimpleTheme" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
    <item name="actionBarStyle">@style/SimpleActionBar</item>
</style>

<style name="SimpleActionBar" parent="Widget.MaterialComponents.ActionBar.Solid">
    <item name="background">@color/lime</item>
</style>

However, when I replace the name in the action bar style from 'background' to 'android:titleTextColor' or 'android:textColor' or some of the other common font colouring properties, it does not work and continues to show the original color (white).

Does anyone have an idea on how I can set the Action Bar's title colour?

Pretty much all similar questions on Stack Overflow are based on AppCompat and none of those solutions worked for me either.

Shahid Thaika
  • 1,857
  • 4
  • 17
  • 54

0 Answers0