I am using a .png image for the icon of my Android app. The problem is the image dimensions (aspect ratio) is not preserved when displaying the icon. For example the circle image is distorted to an oval shape when set as the app icon.
You're probably referring to the launcher icon, right?
According to Making Beautiful Android App Icons, the launcher icon should be square. I had a launcher icon that was not square, and it got stretched (distorted) into a square in the launcher on some devices. The solution I found was to add more (transparent) area on the sides to make it square.
Related
I want splash screen icon in Rectangle shape instead of rounded shape in android 12
I don't believe you can. If you look at point 3 here: https://developer.android.com/about/versions/12/features/splash-screen#elements
It describes the image "As with adaptive icons, ⅓ of the foreground is masked"
The shape of the icon shown is just whatever shape is being used by the system for adaptive icons.
The splash screen changes in android 12 are specifically to reduce the amount of customisation you can do on splash screens, to keep the UX more consistent between apps. The customisation options that do exist are detailed on that page too.
Make your logo's canvas around 35% bigger, with the square logo in the middle, keeping the logo the same size. Then Android 12 will round a 1/3rd of the image, but your logo will be untouched.
so I want to make icon for push notification. say for example I want to use the android image below as notification icon
https://p7.hiclipart.com/preview/135/689/279/android-computer-icons-logo-android.jpg
so I try to make it using Android asset studio. but the image generated from this Android Asset studio is completely white like this
what should I do ? is there any image requirement for this ?
Use Transparent Images
The icons generated will be totally solid color (dark grey or white will be used on the device depending on theme).
The icon you add should only contain the "shape" you want to show as the single color. The rest should be transparent pixels.
Any non-transparent pixels will be converted to white. So if you have a square logo with no transparent pixels, it will be a giant single colored square.
Use a .png image so you can save it with transparent background.
As you can see, icons in notifications bar are white, that's why you are seeing all white
I have three different applications, all of which I am using the same style to create icons. Right-click mipmap > New > Image Asset
Using these settings:
But two icons have shrunk to the center of a round icon (blue and green) and one has the full icon as a square (Red) Which is I want.
When I look in Finder at the icons themselves they look normal.
Any ideas?
Read the Adaptive Icons Documentation. If you target 26+, you need to provide adaptive launcher icons or the launcher will place your default icon fully within the mask of the launcher icon background. Notice that Gmail also has the white circle around its icon in your screenshot.
Are there any official guidelines for how many pixels the edge radii should be when giving Android launcher icons rounded corners?
I've found guidelines for launcher icon pixel sizes (but rounded corners aren't mentioned), a tool called Android Asset Studio which rounds the corners for you (but the tool provides undesirable and non-configurable padding around the edges of each icon), and another tool called Icon Slayer (but the tool creates corners that I feel are way too round, and feel very iOS).
I've also noticed that of all the apps that I personally use that have rounded corners on their launcher icons, the edge radii almost always seem to vary from icon to icon. When I place the various icons next to each other, some look pretty close, but they mostly feel just a little bit off from each other.
Any help?
Check out Google's official Material Design guidelines for Icons about two thirds of the way down the page under the sub-heading Corners.
It indicates you should use a 2px radius on the corners. If go up a few sections, under the heading Content Area you'll see this is for a 24x24 px icon. You can scale up for other resolutions from there.
The radius of the corners should be 8.33% of the size of the icon according to Materiel guidelines.
So if the size of the icon in your project is:
1000px by 1000px, then the corner radius should be 83.3px.
However, you should probably make your document bigger than that.
Maybe 2000px by 2000px, and the radius:
2000px * 0.0833 = 166.6px
This is just in case you need to export a version of your icon that is bigger than 1k px.
Squares and rectangles on 192x192 px grid, when used as background shapes for android product icon, should always have 12px radius corners.
Read details
I am having problems getting transparency to work well on an ImageView. The images at (http://img265.imageshack.us/img265/6233/whatn.png) were screen captured from a Droid (hdpi). The top image I made in Photoshop and left the background white. The bottom image is the same image with the background transparent and the layout's color (white) shows through.
Whenever I have transparent backgrounds in images it dithers shadows like this. Also, it only happens on hdpi devices, on my G1 (mdpi) it looks just fine. What is going on? How can I make the bottom image look as good as the top one?
Try setting the window PixelFormat in your Activity
getWindow().setFormat(PixelFormat.RGBA_8888);
In older device and simulator, you should use png image with transparent channel. Try re-open your image and save as with a transparent channel.