Android toolbar icon color not so bright

怎甘沉沦 提交于 2021-02-05 10:40:53

问题


I am developing an app in which there are multiple tabs with icon without any title. The problem is that the icons are not looking as bright it should. I used white color(FFFFFF) in creating icon assets. Still it doesn't looks so good.

The pic above shows Facebook Messenger and my App. There is difference between color(although both are white). Any suggestion will be appreciated.


回答1:


Yeah I have experienced similar problem. I think it is fault of android asset studio when I create icon with white in reality they are no white as I expected.Then I found very good online studio which is same as Android asset studio even better than that. Solution for this I think you have create icon out from AS then import them to appropriate folders.Here online icon generate web site link




回答2:


Note: The question is old, but I consider sharing this information could be useful for anyone who could stumble upon this issue in the future.

If you use the Asset Studio tool from the Android Studio your icons will contain alpha channel with a value of 60% (value depends on selected colour). I provided an example below.

In case you can use vector graphics it should work for you because you can freely edit XML file describing the generated image. Just remove android:alpha=".." attribute.

If you cannot use vector graphics and want to avoid transparency use this official online tool from Google to generate material icons for your application.

This tool supports multiple sizes, black and white colours, and SVG as well as PNG format:

Issues example of 60% alpha channel in Android Studio:



来源:https://stackoverflow.com/questions/42612569/android-toolbar-icon-color-not-so-bright

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!