Changing the title color of my application

Asked

Viewed 492 times

0

I have tried various codes to change the color of the title that is in the application’s actionbar, but nothing, I think it’s simple, but I can’t figure out how. use the "Theme.AppCompat.Light" theme created by Action Bar Style Generator.

print

1 answer

1


Solved :)

<style name="MeuAppActionBarTheme" parent="@style/Theme.AppCompat.Light.DarkActionBar">
        <item name="actionBarStyle">@style/MeuAppActionBar</item>                
    </style>

    <style name="MeuAppActionBar" parent="@style/Widget.AppCompat.ActionBar">
        <item name="titleTextStyle">@style/MeuApp.TitleTextStyle</item>
        <item name="subtitleTextStyle">@style/MeuApp.SubTitleTextStyle</item>               
        <item name="background">@color/azul_escuro</item>                
    </style>

    <style name="MeuApp.TitleTextStyle" parent="@style/TextAppearance.AppCompat.Widget.ActionBar.Title">
        <item name="android:textColor">@color/branco</item>
        <item name="android:textStyle">normal</item>
    </style>    

    <style name="MeuApp.SubTitleTextStyle" parent="@style/TextAppearance.AppCompat.Widget.ActionBar.Subtitle">
        <item name="android:textColor">@color/branco</item>
        <item name="android:textStyle">normal</item>
    </style>

Browser other questions tagged

You are not signed in. Login or sign up in order to post.