android设置toolbar的menu itemTextView颜色 set toolbar menu item text color

参考:http://stackoverflow.com/questions/26969424/how-to-set-toolbar-text-and-back-arrow-color


设置:

app:theme="@style/ToolBarStyle"


toolbar.xml

<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/toolbar"
    android:layout_width="match_parent"
    android:layout_height="?attr/actionBarSize"
    android:background="@color/actionBar"
    app:titleTextAppearance="@style/ToolbarTitleText"
    app:theme="@style/ToolBarStyle">

    <TextView
        android:id="@+id/title"
        style="@style/ToolbarTitleText"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:text="hh"/>
</android.support.v7.widget.Toolbar>

style

<!-- ToolBar -->
    <style name="ToolBarStyle" parent="Widget.AppCompat.Toolbar">
        <item name="actionMenuTextColor">#ff63BBF7</item>
    </style>


你可能感兴趣的:(android,set,toolbar)