Text Style Color - Text Color - Android

<style name="Theme.RateItTheme" parent="@android:style/Theme.Holo.Light">
    <item name="android:actionBarStyle">@style/MyActionBar</item>
    <item name="android:titleTextStyle">@style/MyActionBar.Text</item>
</style>

<style name="MyActionBar" parent="@android:style/Widget.Holo.Light.ActionBar">
    <item name="android:background">#2E495E</item>
</style>

<style name="MyActionBar.Text" parent="@android:style/TextAppearance.Holo.Widget.ActionBar.Title">
    <item name="android:textColor">#ECECEC</item>
</style>

I managed to change the background, but not the color of the text. Or a three-point overflow menu. My code is above.

+5
source share
2 answers

You need to move your attribute titleTextStyleto your style MyActionBar. Do you understand why it should be placed there, and not where you originally had it?

<style name="MyActionBar" parent="@android:style/Widget.Holo.Light.ActionBar">
    <item name="android:background">#2E495E</item>
    <item name="android:titleTextStyle">@style/MyActionBar.Text</item>
</style>

Regarding changing the overflow icon, I think that when you say “three dots”, I already wrote a message about this here .

+9
source

try it

<?xml version="1.0" encoding="utf-8"?>
<!-- For honeycomb and up -->
<resources>

    <style name="Theme.RateItTheme" parent="@android:style/Theme.Holo.Light">
        <item name="android:actionBarStyle">@style/MyActionBar</item>
        <item name="android:actionMenuTextColor">@color/actionBarText</item>
    </style>

    <style name="MyActionBar" parent="@android:style/Widget.Holo.Light.ActionBar">
        <item name="android:background">#2E495E</item>
        <item name="android:titleTextStyle">@style/MyActionBar.Text</item>
    </style>

    <style name="MyActionBar.Text" parent="@android:style/TextAppearance">
        <item name="android:textColor">#ECECEC</item>
    </style>

</resources>
+5
source

All Articles