-
Notifications
You must be signed in to change notification settings - Fork 9.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ic_stop_white_*dp.png background is black, not transparent #137
Comments
To be clear, are you taking the icons from this repo and importing them into Android Studio? |
It was from the png download link option on the live site, not from the repo. I haven't checked yet if this problem's present with the resources in the repo. |
Thanks for finding this Steven. It looks like this is an Android Studio bug. We'll talk to the Android Studio team and get to the bottom of it. |
That's what I thought too but it wasn't just in Android Studio's preview window, it was also black and lacked alpha in-app. |
Are you sure? Which version of Android are you running? |
It happens on the android L emulator and my nexus 5 (5.1). It just appears to be an asset issue as other resources are fine. Again this is with the png link from the main site https://storage.googleapis.com/material-icons/external-assets/v1/icons/zip/ic_stop_white_48dp.zip not from repo. edit: I've just tried https://github.com/google/material-design-icons/blob/master/av/drawable-xxxhdpi/ic_stop_white_48dp.png and Android Studio's preview also shows it as black. |
I haven't been able to reproduce the problem in an emulator, or on device, but still looking into it. Also, filed this bug against Android Studio: |
I had the same problem with ic_menu_white_36dp for all sizes except hdpi. It seems like an android studio bug and if you just drag the files into the correct destination folders outside of Android Studio, the icon would be fine in the device, but still has the black background shown in Android Studio. |
ic_add_white_24dp.png also got this issue |
also ic_add_white_36dp.png and 48 but not 18 for some reason... Android Studio 2.1.2 |
same for ic_flight_takeoff_black_24px.svg and ic_flight_land_black_24px.svg |
Same for ic_add_white_48dp downloaded through https://design.google.com/icons/. In the finder it shows transparency but in the android tools it has a black background. In app it has normal transparancy |
I found the with icons that have either full opacity or full transparency pixels. For a given icon, it can depend on the actual size as scaling is involved. Dolphin, Gwenview and Okular display those icons with an opaque black background. The PNGs are probably not bad per se, but I think they have been written in a not optimally compatible manner. Saving them from Gimp or running pngcrush on them fixes the issue, but adds an extra few bytes (not a big deal IMHO). |
Weirdly I just came across this issue when converting my pngs to WebP. It was fine in PNG, now when I redownload the image (https://material.io/icons/#ic_add) it has a black background so a bit stuck. In 36dp sizing Android Studio tells me they have a 1-bit colour profile which might be the issue. Edit: I imported the images again, converted them to WebP with the tool built into Android studio and it worked. Both AS and the app show it with a transparent bg as I expected Edit 2: Issue has not gone away, it seems to have gone back to having a black bg. Just going to create the icons manually |
You can fix issue this way |
The assets have been updated since this issue was reported, so I believe this should be fixed. If not, feel free to reopen this issue or create a new one with more information. |
Duplicate of #[Gmail](jazminlopez2330 Details
|
https://storage.googleapis.com/material-icons/external-assets/v1/icons/zip/ic_stop_white_48dp.zip
In Android Studio's preview window & in-app, the white stop icon's background is not like the others--there's no transparency and it's just black. The zips for each dp would need to be regenerated.
Eg
Compared to something like this
The text was updated successfully, but these errors were encountered: