我在我的Android应用程序中有一个android.support.v7.widget
工具栏。它的背景颜色是鲜艳的橙色,最上面的颜色是白色而不是黑色。更改工具栏溢出图标颜色
我有黑色的默认颜色,而不是白色。由于它会与其他东西冲突,这几乎不可能覆盖。 我无法将主要文字颜色更改为白色!
我已经设法改变标题颜色。 我现在要找的是我如何改变动作按钮颜色(以白色)。
感谢
编辑:包括代码现在
主要活动:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:context=".UI.activities.MainActivity">
<android.support.v7.widget.Toolbar
android:id="@+id/r2_toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
android:elevation="4dp"
app:titleTextColor="@color/primary_text_material_light"
app:subtitleTextColor="@color/primary_text_material_light"
android:theme="@style/R2Theme.Toolbar"/>
<fragment android:name="com.r2retail.r2retailapp.UI.fragments.SetupFragment"
android:layout_below="@+id/r2_toolbar"
android:id="@+id/list"
android:layout_weight="1"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</RelativeLayout>
菜单栏:
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item android:id="@+id/about"
android:icon="@drawable/ic_menu"
android:title="About"
app:showAsAction="never"/>
</menu>
款式:
<resources>
<style name="R2Theme" parent="Theme.AppCompat.Light.NoActionBar">=
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorPrimary</item>
<item name="android:textColorPrimary">@color/secondary_text_material_dark</item>
<item name="android:textColorSecondaryInverse">@color/primary_text_material_light</item>
</style>
<style name="R2Theme.Toolbar" parent="R2Theme">
<item name="actionMenuTextColor">@color/primary_text_material_light</item>
</style>
</resources>
显示你的代码的东西,包括与该按钮工具栏。 –
@SatanPandeya我添加了代码 –
是否没有办法自定义ic_menu颜色,直接从它的文件中改变'fillColor'? –