Change title color in toolbar?

Per the Theme vs Style blog post by the creator of AppCompat and the post on version 21 of AppCompat, a DarkActionBar toolbar (i.e., a Toolbar with a dark background and light text), can be accomplished by adding android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" to your Toolbar's XML:

<android.support.v7.widget.Toolbar
    android:id="@+id/toolbar"
    android:minHeight="?attr/actionBarSize"
    android:background="@color/primary"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
    app:popupTheme="@style/ThemeOverlay.AppCompat.Light">

    <Spinner
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:id="@+id/statsSpin"
        android:spinnerMode="dropdown"/>


</android.support.v7.widget.Toolbar>

This will change text color and the default colors to many attributes (such as your Spinner to light text as is needed for the dark background.


Create a new style in application base theme

  <style name="custom_toolbar" parent="@style/Widget.AppCompat.Toolbar">
        <item name="titleTextColor">#replace with color</item>
  </style>

and use the style for the toolbar

  <item name="toolbarStyle">@style/custom_toolbar</item>

I know there are a lot of answers above hope, it will help someone who doesn't understand above answers.

Android has view called Toolbar.This view has title which always takes as default color from color.xml resources which item name is accent.You can change your toolbar color in two way.

  1. Via xml which I recommend you to do that, here below you can see example

    <android.support.v7.widget.Toolbar
        android:id="@+id/toolbar"
        android:layout_width="match_parent"
        android:layout_height="?attr/actionBarSize"
        app:titleTextColor="@color/White" />Here you can change it.Remember APP attribute not ANDROID
    
  2. Via programmatically within activity or fragment.

    Toolbar toolbar = (Toolbar)findViewById(R.id.toolbar);
    toolbar.setTitleTextColor(ContextCompat.getColor(this, R.color.colorAccent));
    

Programatically:

toolbar.setTitleTextColor(0xFFFFFFFF);