I want to change only the AppBar text color, but in the Theme Editor (I use Android Studio) I can only change textColorPrimary (it changes AppBar text color but also the LargeText color).
My current theme:

I can change only textColorPrimary:

Now I change the text color like this:
style.xml
<resources>
    <!-- Base application theme. -->
    <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
        <item name="colorPrimary">@color/colorPrimary</item>
        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
        <item name="colorAccent">@color/colorAccent</item>
    </style>
</resources>
activity.xml
...
<android.support.design.widget.AppBarLayout
        ...
        android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
        <android.support.v7.widget.Toolbar
           ...
            app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" />
        ...
</android.support.design.widget.AppBarLayout>
Is it possible to change text color in my AppTheme in style.xml?
ThemeOverlay.AppCompat.Dark.ActionBar.textColorPrimary. For overflow and icons it will be textColorSecondary.Then use the custom theme you created to set theme for your toolbar.
@color/colorForeground
You can just add "colorForeground" attribute in styles for changing the foreground color in appbar. This also changes the text colour and the color of the menu dots.
Or you can use the theme editor to edit the colors.
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