How to set icon color of MenuItem?

后端 未结 9 694
面向向阳花
面向向阳花 2021-01-30 12:37

I defined a menu item that has ShareActionProvider and share white icon like so :



        
9条回答
  •  孤城傲影
    2021-01-30 13:14

    This is a theming issue. Depending on your current theme, you need to set the correct ActionBar overlay theme. The Action Provider reads a value in the theme (which indicates if the theme is dark or light) to determine the color of the icon.

    If your main theme is light and your ActionBar is dark, your ActionBar/Toolbar must use the theme ThemeOverlay.AppCompat.Dark.ActionBar.

提交回复
热议问题