title: How to change color Toolbar icons?
body: <p>I am currently trying to change the colors of the icons in the toolbar via the theme (I know the way to do it via kotlin but I am interested to be able to do it on the whole app via a theme). Even though I read the <a href="https://material.io/components/app-bars-top/android#contextual-action-bar" rel="nofollow noreferrer">google doc</a> on this subject and several topics, I was not able to change the color of these icons. I'm using MaterialTheme</p>
  <p>Manifest where I defined my theme and my activity :</p>
  <pre class="lang-xml prettyprint-override"><code>&lt;application
          android:name=&quot;.App&quot;
          android:theme=&quot;@style/Theme.MyApp&quot;&gt;
          &lt;activity
              android:name=&quot;.views.activity&quot;
              android:label=&quot;@string/title_activity&quot; /&gt;
  
      &lt;/application&gt;
  </code></pre>
  <p>Themes.xml</p>
  <pre class="lang-xml prettyprint-override"><code> &lt;!--Top level DayNight theme to be used in AndroidManifest.xml--&gt;
      &lt;style name=&quot;Theme.MyApp&quot; parent=&quot;Base.Theme.MyApp&quot; /&gt;
      &lt;!--Base custom theme which will be shared between both light and dark theme variants--&gt;
      &lt;style name=&quot;Base.Theme.MyApp&quot; parent=&quot;Base.Theme.MaterialThemeBuilder&quot;&gt;
  
          &lt;!--Material color attributes (light theme) --&gt;
          &lt;!--colorPrimary colors map to components and elements, such as app bars and buttons. --&gt;
          &lt;!--colorSecondary colors are most often used as accents on components, such as FABs and --&gt;
          &lt;!--selection controls.--&gt;
          &lt;item name=&quot;colorPrimary&quot;&gt;@color/primaryColor&lt;/item&gt;
          &lt;item name=&quot;colorPrimaryVariant&quot;&gt;@color/primaryLightColor&lt;/item&gt;
          &lt;item name=&quot;colorSecondary&quot;&gt;@color/secondaryColor&lt;/item&gt;
          &lt;item name=&quot;colorSecondaryVariant&quot;&gt;@color/secondaryLightColor&lt;/item&gt;
  
          &lt;!--colorBackground appears behind scrollable content and is used for the default window--&gt;
          &lt;!--background. colorSurface is mapped to the surface of components such as cards, sheets--&gt;
          &lt;!--and menus. colorError is used to indicate an error state for components such as--&gt;
          &lt;!--text fields.--&gt;
          &lt;item name=&quot;android:colorBackground&quot;&gt;@color/grey_200&lt;/item&gt;
          &lt;item name=&quot;colorSurface&quot;&gt;@color/black_800&lt;/item&gt;
          &lt;item name=&quot;colorError&quot;&gt;@color/red_600&lt;/item&gt;
          &lt;!--&quot;On&quot; colors define how text, icons and strokes are colored in relation to the surface--&gt;
          &lt;!--on which they appear.--&gt;
          &lt;item name=&quot;colorOnPrimary&quot;&gt;@color/black_800&lt;/item&gt;
          &lt;item name=&quot;colorOnSecondary&quot;&gt;@color/black_800&lt;/item&gt;
          &lt;item name=&quot;colorOnBackground&quot;&gt;@color/black_800&lt;/item&gt;
          &lt;item name=&quot;colorOnSurface&quot;&gt;@color/black_800&lt;/item&gt;
          &lt;item name=&quot;colorOnError&quot;&gt;@color/white&lt;/item&gt;
          &lt;!--Material type attributes--&gt;
          ...
          &lt;!--Material shape attributes--&gt;
          ...
          &lt;item name=&quot;toolbarStyle&quot;&gt;@style/Widget.MyTheme.Toolbar&lt;/item&gt;
      &lt;/style&gt;
  </code></pre>
  <p>Styles.xml</p>
  <pre class="lang-xml prettyprint-override"><code>    &lt;!--Toolbar--&gt;
      &lt;style name=&quot;Widget.MyTheme.Toolbar&quot; parent=&quot;Widget.MaterialComponents.Toolbar.Surface&quot;&gt; // I have also try ThemeOVerlay here and Toolbar.Primary
          &lt;item name=&quot;android:background&quot;&gt;@color/grey_200&lt;/item&gt;
          &lt;item name=&quot;titleTextAppearance&quot;&gt;@style/TextAppearance.MyTheme.Headline6&lt;/item&gt;
          &lt;item name=&quot;subtitleTextAppearance&quot;&gt;@style/TextAppearance.MyTheme.Subtitle1&lt;/item&gt;
          &lt;item name=&quot;titleTextColor&quot;&gt;@color/black_800&lt;/item&gt;
          &lt;!-- color used by navigation icon and overflow icon --&gt;
          &lt;item name=&quot;colorOnPrimary&quot;&gt;@color/red_800&lt;/item&gt;
          &lt;item name=&quot;colorControlNormal&quot;&gt;@color/red_800&lt;/item&gt;
      &lt;/style&gt;
  </code></pre>
  <p>As you can see the toolbar is provided by the theme so the activity xml is not revelant here. My icons are in vector format, generated via AndroidStudio. I have try <a href="https://stackoverflow.com/a/29040409/7355733">this solution</a> but not working :/</p>