I have a navigationView in my app and after add two lines in app style :
- false
-
If you are looking to change text colors/appearance in the NavigationView
Items, you should use the attribs
app:itemTextColor
app:itemIconTint
app:itemTextAppearance
Otherwise, Specify which view's color you want to change. Setting android:textColorSeconday
is a bad idea according to me.
Using a Toolbar
, to change the navigation icon color you can use:
With a MaterialToolbar or (androidx and a Material theme):
<com.google.android.material.appbar.MaterialToolbar
android:theme="@style/MyThemeOverlay_Toolbar"
...>
<style name="MyThemeOverlay_Toolbar" parent="ThemeOverlay.MaterialComponents.Toolbar.Primary">
<!-- color used by navigation icon and overflow icon -->
<item name="colorOnPrimary">@color/secondaryColor</item>
</style>
With the support Library:
<android.support.v7.widget.Toolbar
app:theme="@style/ThemeToolbar" />
<style name="ThemeToolbar" parent="Theme.AppCompat.Light">
<!-- navigation icon color -->
<item name="colorControlNormal">@color/my_color</item>
</style>