Skip to content Skip to sidebar Skip to footer

How Can I Change The Color Of Icons In Toolbar?

I am trying to implement Material Design in my app, using the Material Components library. I want my icons and back arrow to be white but I am unable to change their color. Where a

Solution 1:

I am using below theme, Where i am getting white back icon in toolbar

<resources><!-- Base application theme. --><stylename="AppTheme"parent="Theme.MaterialComponents.Light.NoActionBar"><!-- Customize your theme here. --><itemname="colorPrimary">@color/colorPrimary</item><itemname="colorPrimaryDark">@color/colorPrimaryDark</item><itemname="colorAccent">@color/colorAccent</item><itemname="colorControlNormal">@android:color/white</item></style></resources>

You need to set white color under colorControlNormal in theme as above.

Solution 2:

you can set Toolbar navigation icon like this: Toolbar toolbar = binding.toolBar; toolbar.setNavigationIcon(R.drawable.baseline_arrow_back_white_24);

Post a Comment for "How Can I Change The Color Of Icons In Toolbar?"