How to change the font color of the application title

4

I want to change the font color of the application title

Where is it written COMO ESTOU DIRIGINDO? how to do this?

    
asked by anonymous 12.06.2015 / 21:16

1 answer

4

Android 2.1 and higher
If you are using the Support Library, change the values / styles.xml file to look like this:

<resources>

    <!-- Base application theme. -->
    <!-- Esta primeira linha deixe ficar igual à sua -->
    <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">

        <!-- Inclua estas duas linhas -->
        <item name="android:actionBarStyle">@style/MyActionBar</item>
        <item name="actionBarStyle">@style/MyActionBar</item>

    </style>

    <!-- Inclua este style -->
    <style name="MyActionBar"
        parent="@style/Widget.AppCompat.ActionBar">
        <item name="android:titleTextStyle">@style/MyActionBarTitleText</item>
        <item name="titleTextStyle">@style/MyActionBarTitleText</item>
    </style>

    <!-- Inclua este style, altere o código para a cor que pretender -->
    <style name="MyActionBarTitleText"
        parent="@style/TextAppearance.AppCompat.Widget.ActionBar.Title">

        <!-- Cor vermelha -->
        <item name="android:textColor">#FFFF0000</item>
    </style>

</resources>  

For Android 3.0 and higher (without Support Library )
 Change the values / styles.xml file to look like this:

<resources>
    <!-- the theme applied to the application or activity -->
    <!-- Esta primeira linha deixe ficar igual à sua -->
    <style name="CustomActionBarTheme"
           parent="@style/Theme.Holo">

        <!-- Inclua esta linha -->
        <item name="android:actionBarStyle">@style/MyActionBar</item>
    </style>

    <!-- Inclua este style -->
    <style name="MyActionBar"
           parent="@style/Widget.Holo.ActionBar">
        <item name="android:titleTextStyle">@style/MyActionBarTitleText</item>
    </style>

    <!-- Inclua este style, altere o código para a cor que pretender -->
    <style name="MyActionBarTitleText"
           parent="@style/TextAppearance.Holo.Widget.ActionBar.Title">

        <!-- Cor vermelha -->
        <item name="android:textColor">#FFFF0000</item>
    </style>

</resources>

Source: Android documentation

    
12.06.2015 / 22:53