I've been trying to find solution but none worked for me. Activity theme:
<style name="AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar">
<item name="colorPrimary">@color/white</item>
<item name="actionBarTheme">@style/MyActionBar</item>
</style>
<style name="MyActionBar" parent="ThemeOverlay.AppCompat.Dark.ActionBar">
<item name="android:background">@color/colorPrimaryDesignV4</item>
<item name="android:windowActionModeOverlay">true</item>
<item name="popupTheme">@style/ThemeOverlay.AppCompat.Light</item>
<item name="colorControlNormal">@color/white</item>
<item name="android:titleTextStyle">@style/TitleText</item>
</style>
<style name="TitleText" parent="android:style/TextAppearance.Holo.Widget.ActionBar.Title">
<item name="android:textColor">#DE0F17</item>
<item name="android:textSize">20sp</item>
</style>
all the attributes in MyActionBar work fine but last one. Title color and sizes are unaffected no matter what.
how can i change it?
In method 1 Just go to the activity_main. xml file and add a TextView in the toolbar widget with the text color attribute.
I am using this and it works for me
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="titleTextColor">@android:color/white</item>
<item name="subtitleTextColor">@android:color/white</item>
</style>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With