简体   繁体   中英

custom icon very transparent in action bar

I have created a custom icon for the action bar with color 333333ff (RGBA) and 60% opacity and 32 dp as per the docs . But the icon is barely visible in the action bar. Only when i long click on the space where the icon is supposed to show, i can see it a bit more distinctly. What is wrong with the design of the icon?

Here's a screenshot : 在此处输入图片说明

Here is a screenshot when i long click on it : 在此处输入图片说明

It is very clear if i use it within the body of the app, instead of in the action bar. So does that mean there is some extra transformation done by the action bar on icons?

Make the below changes to the icon design in Inkscape :

  1. Change the opacity of the icon to 80% since the OP is about a dark action bar. 60% is appropriate only for light action bar.

  2. Change the color to #ffffffcc. #cc represents 80% opacity. #ffffff is the color recommended by the docs for dark action bar, as opposed to #333333 for light action bar.

I am not sure why there are two different settings for opacity. But i set both just in case.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM