I have been trying for a long time to create an Android app icon that is the same size as all of the other icons on the device, but my icon is always too small.
I know this is a well documented problem. I have tried every solution I have found but my app icon is still too small.
The posts I have read on Stackoverflow include this, this, this and this.
I have used this tool: Android asset studio. It made the icon too small but that was a know issue. I forked the repo and implemented this fix as documented, but still too small.
I have also tried this tool, this tool and this tool, but they all gave me an icon that showed up as too small on my device.
Then I discovered the tool in Android studio, Image Asset Studio, but unfortunately the icons it produces are too small.
I have tried using a 512 x 512 file in every folder (hdpi / mdpi etc).
I have tried placing them in drawable instead of mipmap.
There is no padding in the source image, the icon reaches the edges of it and is a 512 x 512 png file. I use Android Studio Image Asset Studio to produce the correct sizes.
I place the 48 x 48 in mipmap-hdpi,
I place the 72 x 72 in mipmap-mdpi,
I place the 96 x 96 in mipmap-xhdpi,
I place the 144 x 144 in mipmap-xxhdpi,
I place the 192 x 192 in mipmap-xxxhdpi.
I have used various devices, virtual and physical.
Here are the specs of the source image:
Here is the shape of the source image for ic_launcher_round:
I am a Javascript developer using React Native so not very familiar with the Android ecosystem.
How do I make my icon the same size as all the other icons on my phone?
It seems that you put file in wrong folder.
The 48 x 48 file should in mipmap-mdpi
and
The 72 x 72 file should in mipmap-hdpi
Name Density Pixel
ldpi(0.75x) 120 dpi 36 x 36 px
mdpi(baseline) 160 dpi 48 x 48 px
hdpi (1.5x) 240 dpi 72 x 72 px
xhdpi (2x) 320 dpi 96 x 96 px
xxhdpi (3x) 480 dpi 144 x 144 px
xxxhdpi (4x) 640 dpi 192 x 192 px
FYR
I know that my question is very simple But my question is not for example about how to support multiple screen sizes in android or like this. I know that we should put the launcher icon in the minmap folder instead the Drawablefolder and there are standard sizes in android for the icons.
MDPI: 48x48
HDPI: 72x72
XXHDPI: 144x144
XXXHDPI: 192x192
But if I create an image with paint program in windows and its resolution is 1920 * 1080, as the result it is very big for android.Now my question is, Should I change the 1920 * 1080 resolution to the 48 * 48 resolution by another program? Or If I put the 1920 * 1080 resolution in the minmapfolder in a android project, Does the minmap folder in the android studio changes the 1920 * 1080 resolution for example to the 48 * 48 resolution?
Excuse me If my question is simple.
Those 'standard sizes for icons' are for action bar icons or icons of similar size, but what they do show is the ratio of images/icons for different screen sizes. An image with resolution 1920 * 1080 is likely not an icon but rather a background image, but you should either simply put your image in one of the drawable folders and the OS will scale the image respectively for each screen size, or you can include one image in each drawable folder than follows the recommended ratios.
If you put your image in the /drawable folder, instead of mdpi/hdpi folders the, that image will be scaled automatically depending on your device resolution so if your device is mdpi the image would be scaled down so you will save some memory.
So you can just put the image in the /drawable folder and dont mind it.
I used android asset studio to create Launcher icon:
http://android-ui-utils.googlecode.com/hg/asset-studio/dist/icons-launcher.html#foreground.space.trim=1&foreground.space.pad=0&foreColor=33b5e5%2C0&crop=0&backgroundShape=bevel&backColor=ffffff%2C100
The studio generated images at proper pixel sizes: 48 * 48 (mdpi) 72 *72 (hdpi) and so on..
But on my Samsung galaxy s2 the app icon appear smaller then other apps and not filling its entire space.
Whay is this? how can i stretch it to full extent?
Asset studio adds unnecessary margins to the icon. If someone can come up with a similar tool without adding margins, it would be of great help. The solution to your problem is to use a single 512 by 512 image as icon. Android will scale the rest for you when users install your app.
Instead of importing image through Image Asset in Android Studio, make 5 images with different size:
48 x 48
72 x 72
96 x 96
144 x 144
192 x 192
And then directly copy in respective Drawable folder (mdpi, hdpi, xhdpi, xxhdpi, xxxhdpi) with same name.
I have the same problem with the Asset Studio on Android Studio.
The only work-around was to make the images myself. Most of the time, just providing one image at 192*192 worked for me, instead of creating the whole mipmap.
Check the drawable-hdpi folder, and see if it has the correct one. The SII has a HDPI density, so you might have copied the icon into the wrong folder.
Source: http://blog.blundell-apps.com/list-of-android-devices-with-pixel-density-buckets/
Finding myself in the same situation, I generated the so called web icon, which gave me the rounded corners and shadow and the size big enough to remove padding and produce all the required sizes myself in a graphic editor.
Put a 512 * 512 icon in drawable folder instead of mipmap and then from Android Manifest reference it through android:icon tag
android:icon="#drawable/app_icon"
Worked for me, no margin on corners.
I want to change icons of the my application. I have created a 40x40 icon for this reason. But, I do not know how I can do that ? How can I change the icons of the application ?
And, How can I change the background image of the application ?
Go to AndroidManifest.xml, you will see this:
android:icon="#drawable/ic_launcher"
If you copy your own image to /res/drawable replace the standard icon. If you want to replace other images (wich are located in your code) you can do the same, first copy the image to /res/drawable and then replace the old image name with the new one.
You place your images in the res folders. Just copy and paste it. You can replace the current image by removing it and renaming your image to it's name. Otherwise jsut call the new image from the code
http://developer.android.com/guide/topics/resources/providing-resources.html
This online tool is very helpful in generated icons for different screen densities.
Once you've made the icon, just download it and put the icon in each drawable-X folder from the downloaded file into the corresponding folder in your project.
Then add android:icon="#drawable/filename" to your <application> tag.
For the application background, put the background image in your drawable folders in the required sizes, and then add android:background="#drawable/backgroundname" to the root layout of the Activity.
Other than that, if you prefer to manually resize your icons, here are the sizes for different densities (from here).
ldpi (120 dpi) - 36 x 36 px
mdpi (160 dpi) - 48 x 48 px
hdpi (240 dpi) - 72 x 72 px
xhdpi (320 dpi) - 96 x 96 px
For HDPI, XHDPI, etc. what should be the ideal size of the launcher icon? Should I have to create 9-Patch images for the icon to scale automatically, or would it be better to create separate icons?
I would create separate images for each one:
LDPI should be 36 x 36.
MDPI should be 48 x 48.
TVDPI should be 64 x 64.
HDPI should be 72 x 72.
XHDPI should be 96 x 96.
XXHDPI should be 144 x 144.
XXXHDPI should be 192 x 192.
Then just put each of them in the separate stalks of the drawable folder.
You are also required to give a large version of your icon when uploading your app onto the Google Play Store and this should be WEB 512 x 512. This is so large so that Google can rescale it to any size in order to advertise your app throughout the Google Play Store and not add pixelation to your logo.
Basically, all of the other icons should be in proportion to the 'baseline' icon, MDPI at 48 x 48.
LDPI is MDPI x 0.75.
TVDPI is MDPI x 1.33.
HDPI is MDPI x 1.5.
XHDPI is MDPI x 2.
XXHDPI is MDPI x 3.
XXXHDPI is MDPI x 4.
This is all explained on the Iconography page of the Android Developers website:
http://developer.android.com/design/style/iconography.html (as of 2014)
Material design principles: https://material.io/design/iconography/product-icons.html
Play store guidelines: https://developer.android.com/distribute/google-play/resources/icon-design-specifications
Don't Create 9-patch images for launcher icons . You have to make separate image for each one.
LDPI - 36 x 36
MDPI - 48 x 48
HDPI - 72 x 72
XHDPI - 96 x 96
XXHDPI - 144 x 144
XXXHDPI - 192 x 192.
WEB - 512 x 512 (Require when upload application on Google Play)
Note: WEB(512 x 512) image is used when you upload your android application on Market.
|| Android App Icon Size ||
All Devices
hdpi=281*164
mdpi=188*110
xhdpi=375*219
xxhdpi=563*329
xxxhdpi=750*438
48 × 48 (mdpi)
72 × 72 (hdpi)
96 × 96 (xhdpi)
144 × 144 (xxhdpi)
192 × 192 (xxxhdpi)
512 × 512 (Google Play store)
Android icons require five separate sizes for different screen pixel densities. Icons for lower resolution are created automatically from the baseline.
mdpi (Baseline): 160 dpi 1×
hdpi: 240 dpi 1.5×
xhdpi: 320 dpi 2×
xxhdpi: 480 dpi 3×
xxxhdpi: 640 dpi 4× (launcher icon only)
Launcher icons (.Png)
48 × 48 (mdpi)
72 × 72 (hdpi)
96 × 96 (xhdpi)
144 × 144 (xxhdpi)
192 × 192 (xxxhdpi)
512 × 512 (Google Play store)
Action bar, Dialog & Tab icons
24 × 24 area in 32 × 32 (mdpi)
36 × 36 area in 48 × 48 (hdpi)
48 × 48 area in 64 × 64 (xhdpi)
72 × 72 area in 96 × 96 (xxhdpi)
96 × 96 area in 128 × 128 (xxxhdpi)*
Notification icons
22 × 22 area in 24 × 24 (mdpi)
33 × 33 area in 36 × 36 (hdpi)
44 × 44 area in 48 × 48 (xhdpi)
66 × 66 area in 72 × 72 (xxhdpi)
88 × 88 area in 96 × 96 (xxxhdpi)*
Small Contextual Icons
16 × 16 (mdpi)
24 × 24 (hdpi)
32 × 32 (xhdpi)
48 × 48 (xxhdpi)
64 × 64 (xxxhdpi)*
The xxxhdpi size needed only by the launcher icon as the Supporting multiple Screens official site says.
Adaptive Icons
Starting with Android 8.0 there are adaptive icons, which are made up of two separate layers. Both layers are 108 x 108 dp.
(image adapted from Android documentation)
Sizes
If you are supporting versions below Android 8.0, you still need to include the legacy sizes (48dp). I marked the pixel sizes in red for each resolution below.
Don't do it by hand
I suppose you could make all of those by hand if you want to, but I have to say that my days of doing that are over. The Android Studio 3.0 Asset Studio is quite good and will generate them all for you. All you have to do is supply a sufficiently large foreground and background image. (I used a 1024 x 1024 px image).
To open the Asset Studio go to File > New > Image Asset.
No need for third party tools when Android Studio can generate icons for us.
File -> New -> Image Asset
Then choose Launcher Icons as the Asset Type:
Choose a High-res image for the Image file:
Next -> Finish to generate icons
Finally update android:icon name field in AndroidManifest.xml if required.
Provide at least an 512px X 512px image and use this tool:
https://romannurik.github.io/AndroidAssetStudio/icons-launcher.html
It will generate all icons for you in the correct size, inclusive the web image for the play store.
According to the Material design guidelines (here, under "DP unit grid"), your product icon should be of size 48 dp, with a padding of 1dp, except for the case of XXXHDPI, where the padding should be 4dp.
So, in pixels, the sizes are:
48 × 48 (mdpi) , with 1 dp padding
72 × 72 (hdpi), with 1 dp padding
96 × 96 (xhdpi), with 1 dp padding
144 × 144 (xxhdpi), with 1 dp padding
192 × 192 (xxxhdpi) , with 4 dp padding
I recommend to avoid using VectorDrawable as some launchers don't support it, but I think WEBP should be ok as long as you have your minSdk support transparency for them (API 18 and above - Android 4.3).
If you publish on the Play Store, the requirement to what to upload there are (based on here) :
32-bit PNG (with alpha)
Dimensions: 512px by 512px
Maximum file size: 1024KB
LDPI should be 36 x 36.
MDPI 48 x 48.
TVDPI 64 x 64.
HDPI 72 x 72.
XHDPI 96 x 96.
XXHDPI 144 x 144.
XXXHDPI 192 x 192.
Well as #MartinVonMartinsgrün mentioned Now there is exists Better tools then assert generator in android studio
For application Icon ( Toolbar , ActionBar , DrawableLeft etc ) Use :
http://romannurik.github.io/AndroidAssetStudio/icons-actionbar.html
For launcher (Application Icon ) Use :
https://romannurik.github.io/AndroidAssetStudio/icons-launcher.html
But Here are some tricks and way to get the better resolution for icons and launcher icons.
Step 1 :
First go to the https://materialdesignicons.com and choose your icon . Or if you have your icon in good resolution then skip this step . Click the desired icon and click on "Advanced Export" it will open up a window like this below
Then click the "Icon" to generate icon (.png) . Well the trick is try to generate as large icon as possible for high resolution devices and the tools will handle it all for small devices but if you use small icon , while generating the icon for high end devices you will loose the icon resolution .
Step 2 :
Then go the Tools page and Upload the Icon
Click the "Custom" if you want to color your icon . No matter what color of icon you are uploading , by using Custom you can generate any color you want .
Then choose a name and click "Download .ZIP" . This will download the .zip file with the icon for most of the common resolution . You can copy and paste the res folder in your application project folder and you will see the icon in the drawable section .
I've posted a script for generating all platform icons for PhoneGap apps from a single SVG icon file. If you have existing bitmaps, I also include some notes that may help you to generate the SVG vectors from an existing bitmap. This won't work for all bitmaps but may for yours.
https://github.com/tohagan/phonegap-graphics
I had the same problem but then realized the arrangement of my icon graphic within the square allowed (512 x 512 in my case) was not maximized. So I rotated the image and was able to scale it up to fill the corners better. Then I right clicked on my res folder in my project in Android Studio, then choose New then Image Asset, it took me through a wizard where I got to select my image file to use. Then if you check the box that says "Trim surrounding blank space", it makes sure all edges, that are able, touch the sides of your square. These steps got it much bigger than the original.
Launch image and Slash image size for Google Play Store app submission
High-res icon. PFB the table for required sizes
32-bit PNG (with alpha), Dimensions: 512px by 512px, Maximum file size: 1024KB
Required Launch Icon And Splash Image size
At least 2 screenshots are required overall (Max 8 screenshots per type, Types include "Phone", "7-inch tablet" and "10-inch tablet”).
JPEG or 24-bit PNG (no alpha), Minimum dimension: 320px, Maximum dimension: 3840px, Sample sizes: 320 x 480, 480 x 800, 480 x 854,1280 x 720, 1280 x 800 24 bit PNG or JPEG
You can create icons directly in the android studio itself.The Steps you need to follow are:
1.Right click on Res->New->Image asset
2.CHange asset type to image.
3.Load the image from the local disk
4.You have options to trim,change padding and add background also.Change the values if you need.
5.click Next->Finish.
The image wil be automatically added to mipmap-mdpi,mipmap-hdpi,mipmap-xhdpi,mipmap-xxhdpi,mipmap-xxxhdpi if you select launcher icon or
drawable-mdpi,drawable-hdpi,drawable-xhdpi,drawable-xxhdpi,drawable-xxxhdpi ifyou select other icon optins.