Reputation: 10589
I found this Asset Studio to generate icons. It works fine for the launcher icon but for action bar or notification icons it is not working. I put in my png file and want to generate the icons, but Asset Studio is only generating gray circles. Is there another tool to generate action bar and notification icons?
Upvotes: 32
Views: 43500
Reputation: 378
Use this instead https://romannurik.github.io/AndroidAssetStudio/icons-generic.html
Here demonstrating how to show the image:
Thanks to https://stackoverflow.com/users/3225458/romtsn
Upvotes: 11
Reputation: 19938
Android Studios 2.2 has an Image Asset Studio that you can use to generate your icons.
https://developer.android.com/studio/write/image-asset-studio.html
Upvotes: -1
Reputation: 69
after alot of search this is the solution: the problem is you are adding an image with white background.. to convert the image to actionbar icon you have to load image with transparent background
Upvotes: 0
Reputation: 1471
I use an own module 'icons' with a Gradle script to generate icons. This is a more automated way than the Assets Studio can provide up-to-now. The icon will be designed with Inkscape. See my blog for a detailed description. You find an Android Studio Project on GitHub.
Upvotes: 1
Reputation: 430
I face the same problem their is no issue with icon after Lollipop notification icon do not contains color icon it support flat,Silhouette icon supported.
you should use a condition
boolean useWhiteIcon = (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP);
return useWhiteIcon ? R.drawable.icon_silhouette : R.drawable.ic_launcher;
Upvotes: 0
Reputation: 3167
You can use the built in feature of android studio to generate actionbar and notification icons.
Right click on res
folder and New > Image Asset
. You can choose Launcher Icons
, Action Bar Icons
or Notification Icons
in the Asset Type.
Update: You should look at this. It talks about white icon in notification.
Upvotes: 1
Reputation: 11992
You can use a tool for creating generic icons in Asset Studio: https://romannurik.github.io/AndroidAssetStudio/icons-generic.html. To get it look like ActionBar Icon, you should make next actions:
The sizes of icons will be pretty the same as you can get them with ActionBar Icon Generator.
How it looks for me:
Upvotes: 47
Reputation: 1795
I think it's because your image is too complexe and the main problem is the "color" filter applied in AAS.
I had the same problem and I had to convert xxxhdpi xxhdpi etc. manually. If you work with Sketch (for example) it can be converted easily with a plugin (https://github.com/zmalltalker/sketch-android-assets)
hope it's help !
If you want to use AAR, like @rom4ek explained "4. Move foreground color thumb to 0%" this is the important part
Upvotes: 4
Reputation: 1813
By default it will be grey color for any image. But you can customize it according to your color. Check below screenshot to select CUSTOM tab and then select color you want.
Hope it helps you.
Upvotes: -7