I defined a menu item that has ShareActionProvider and share white icon like so :
-
The icon is actually provided by the ShareActionProvider
and you can't change it afaik. You can, however, customize the color by setting the textColorPrimary
in your styles.xml:
For any custom icons, you would have to color them yourself, ie.
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu_main, menu);
for(int i = 0; i < menu.size(); i++){
Drawable drawable = menu.getItem(i).getIcon();
if(drawable != null) {
drawable.mutate();
drawable.setColorFilter(getResources().getColor(R.color.textColorPrimary), PorterDuff.Mode.SRC_ATOP);
}
}
return true;
}