Как изменить цвет значка панели инструментов? Я хочу, чтобы он был белого цвета. Я изменил свой собственный белый, но результат все еще черный. Я прочитал this post, но проблема с сообщением - цвет текста, а не цвет значка.Изменить панель инструментов Не скрытый значок меню Цвет
ScreenShot
activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:context="com.zihadrizkyef.project_katalog_grosirmukenalukis_admin.MainActivity"
android:id="@+id/activity_home"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<android.support.v7.widget.Toolbar
android:id="@+id/myToolbar"
android:layout_height="?android:attr/actionBarSize"
android:layout_width="match_parent"
android:background="@color/colorPrimary"
android:theme="@style/myToolbarTheme"/>
<ListView
android:id="@+id/lvProduct"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
style.xml
<resources>
<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>
<item name="android:buttonStyle">@style/MyButtonStyle</item>
</style>
<style name="MyButtonStyle" parent="Base.Widget.AppCompat.Button">
<item name="android:textAllCaps">false</item>
<item name="android:background">@drawable/mybutton</item>
<item name="android:textColor">@color/myWidgetContentColor</item>
</style>
<style name="myToolbarTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:textColorPrimary">@color/myWidgetContentColor</item>
</style>
</resources>
menu_home.xml
<?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/action_search"
app:showAsAction="always"
app:actionViewClass="android.support.v7.widget.SearchView"
android:title="Search"
android:icon="@drawable/ic_action_search"/>
</menu>
вы можете показать свой файл меню? – himanshu1496
Вы пробовали, указав цвет оттенка на этот значок? –
Можно ли заменить это mToolBarTheme в стиле и проверить? <Стиль = имя родителя "myToolbarTheme" = ""> \t <имя элемента = "андроид: тема"> @ стиль/ThemeOverlay.AppCompat.Dark.ActionBar \t <имя элемента = "popupTheme"> @ стиль/ThemeOverlay. AppCompat.Light <имя элемента = "андроид: popupMenuStyle"> \t @ стиль/ThemeOverlay.AppCompat.Dark <имя элемента = "андроид: actionMenuTextColor"> \t @ цвет/белый \t – ImGenie