I made my icons using Inkscape following the size guidelines. They looked normal sizes on couple devices. But I wanted to make the corners rounded and I used Android Studio Assets to accomplish that. Even though, the sizes are still accurate they now look smaller on the phones? What is causing that? Has anyone run into the same problems, if so how did you resolve it? I checked SO questions and answers this morning and none of them gave me solution.
This is because you have a transparent padding added by asset studio. I am not sure if there is an option to remove the padding there. Best would be to generate the appropriate sizes straight from inkscape.
See: "Android Asset Studio" adds extra space when I upload my .png icons, but doesn't when it uses its internal cliparts. Why?
Related
I build my Android app with VS2017 Xamarin, but I'm not sure that has anything to do with my problem. I have built an app icon (PNG) that looks like this:
But when I launch my app in an Android emulator, it always crops out some of my icon, thusly:
Notice that a bit of the truck tires and truck top get cropped out. But this makes no sense because as you can see in photoshop, there is plenty of empty space between the truck icon and the edges of the square. I want that space/margin to be preserved inside the icon, and not so aggressively cropped.
I keep adding more and more space, but something (Android OS? Xamarin compiler? VS2017?) seems to be ignoring the margin/space and trying to aggressively crop right up to my icon.
How can I solve this?
It's because your app is trying to look for a Round Icon file as you can see in this Microsoft blog post. The easiest way to solve all your Icon issues for Android, including the pesky adaptive icons, is to use Android Studio. You just install the free application (Windows/Mac) and then
Open the Android Studio, and create a blank project. Then right click on the resources folder of the project and add an “Image Asset”.
In there, add the image, and then resize the image appropriately. Press OK.
Reveal the file in Finder/Explorer and Migrate all the files and folders to your existing project in Visual Studio.
For rounded icons to work, you might have to make changes to the manifest file, or what ever file in the app you set the icon image name, and add an attribute of rounded-icon like in the article
Test it & it should work
I want to place a google sign in button in my cross-platform xamarin app.
I downloaded the assets from google and am confused as to how I'm supposed to use them...
In the android folder, there are assets for the various DPIs. But the problem is they all seem to have some weird black lines around them...
What is the intended use of these lines? Am I supposed to crop them out?
Obviously I could just edit the files to my liking but I want to stay as true to google's usage policy as possible, and avoid altering another company's assets if possible.
I noticed that in the "web" folder there are complete buttons. So why would I use what's in the android folder?
How does google intend for developers to use these assets?
I too have similar questions when trying to customise my Google Sign In buttons, and finally figured it all out after digging through the Android Documentation.
What is the intended use of these lines?
The top and left lines define the area of the image that you are allowed to stretch, and the bottom and right lines define the area of the image that your text will occupy (see image below)
Am I supposed to crop them out?
No. Add this image into your drawable/res folder. Make sure you leave the .9.png extension as it is otherwise Android Studio won't adhere to the features mentioned previously!
Why would I use what's in the android folder?
Great question! Because using this will make customising your app for different devices easier. To explain further, it is worth clarifying that:
unlike any image assets, you will realise that this asset has a .9.png extension, suggesting that it is a Nine Patch Drawable Graphic
it allows your text to fit nicely within the predetermined area, so it helps you to adhere to Google's branding guidelines
For more information, read here.
Hope this helps! Cheers.
Just use the batch drawable in android and edit the picture in ANDROID cropping out the image black lines.
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.
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
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:
While working on Android projects I sometimes feel the need for editing my icons to cope up with the changes in theme and or background of activity / view that is going to hold it. The way I do it currently is I first remove the icon file from all the drawable folders and then create a new icon through launcher Icon wizard. I was wondering if there is a plugin or some way in eclipse to edit the icon and reflect the same changes for all the resolutions without the need for deleting and creating from scratch.
I researched in several forums and I dont think eclipse has any such capability as of now.
i've saved my icon as a png-32, with transparency checked and tried saving for web but the black background is still there. i've also saved as a nornmal png and still no good. i fixed this about 6 months ago but for the life of me i can't remember now.
any help would be great thanks
The actual technique will depend somewhat on the application you're using, but it's very easy to do in Gimp (free). You simply add a transparent layer, select the background and then delete it. Here's a link that explains the process: http://www.fabiovisentin.com/tutorial/GIMP_transparent_image/gimp_how_to_make_transparent_image.asp.
If you're using a different tool, such as Photoshop, the exact process will of course be slightly different. Hope this helps.