I am working on my first android app,The problem I am having is that the app icon is very very small.
I tried to add an icon by follow this: File > New > Image Assets > select launcher icon > choose image file.
I put icon size 512X512. It placed them in the different MipMap folders in different size but when I launch my app i see that my icon is smaller than the others.
It is much smaller than the others (my app is 'roomates').
Eliminate the extra white-space/transparency around your app icon.
Additionally follow the below stated guidelines for optimum results. Drop respective icon (based on icon size) in the respective mip-map folder.
Format - *.PNG
48 × 48 (mdpi)
72 × 72 (hdpi)
96 × 96 (xhdpi)
144 × 144 (xxhdpi)
192 × 192 (xxxhdpi)
512 × 512 (Google Play store)
I'm trying to understand what are all the various icon dimensions (in pixels) that are needed to make android apps. So far I found this site:
http://iconhandbook.co.uk/reference/chart/android/
And I see that I need (in terms of the launcher icon)
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.
WEB - 512 x 512 (Require when upload application on Google Play).
And then I need this
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)
These are used to represent application notifications in the status bar. They should be flat (no gradients), white and face-on perspective.
Is this missing ldpi? Also I don't understand why it says like 22x22 area in 24x24, what are the two dimensions mean?
Thanks
Android Notification icons are expected to have some internal padding on each edge. That's why this guide recommends using a smaller space than the total size of the png. The padding space should be transparent.
If this guide left off ldpi, then you can compute its final size given the relative size differential between between the different densities. The official documentation is here.
It took me a while to find the exact quotation
Low-density (ldpi) resources aren’t always necessary. When you provide hdpi assets, the system scales them down by one half to properly fit ldpi screens.
It can be found at the bottom of this article
As I found in android documentation site, the there are 4 general sizes for android devices screens. but I found the measurements unit in dp.
like this :
xlarge screens are at least 960dp x 720dp
large screens are at least 640dp x 480dp
normal screens are at least 470dp x 320dp
small screens are at least 426dp x 320dp
How to do that on photoshop, how to get the sizes in pixels ?
Do I need to have 4 design ldpi, mdpi, hdpi and xhdpi ? do I need to have 16 versions of the design. ?
yes you have 4 designs like :
xhdpi = 100% image
hdpi = 75% image of xhdpi image
mdpi = 50% image of xhdpi image
ldpi = 50% image of hdpi image
i.e :
if you have 96 x 96 image in xhdpi then, you need to put
72 x 72 in hdpi folder - ( 75 % of xhdpi )
48 x 48 in mdpi folder - ( 50 % of xhdpi )
36 x 36 in ldpi folder - ( 50 % of hdpi )
How to do that in Photoshop?
Just create a high res version of your image with width and height as multiple of 16
Then use my Photoshop Output Android Assets script to generate
down-scaled version of images
AND "drawable-XXXX" folders for them
Why 16 pixels? For good down-scaling results:
ldpi mdpi tvdpi hdpi xhdpi xxhdpi xxxhdpi
0,75 1 1,33 1,5 2 3 4
3 4 5,32 6 8 12 16
Check my SO answer here for more information:
What is the best way to create drawables for different dpi
With my app I chose one screen size for it
Hdpi
And only used one image
android:background="#drawable/imagename"
If you want one for all sizes make one image
Resize it for each one
Then edit the XML file so that it can be used by the activity
See there are may ways,
If your background has repeating patterns you can use nine png,you ll get a lot on the internet for the same.
But if there is no repeating pattern u hve to make 4 images
to do you need to target screen fist for example you target xhdpi then its 960px*720 pixel with density per inch as 320px
now in photoshop make your all designs with considering max length as 960px and max width as 720px keep density as 320.
Now to scale change the density of images as 240 for hdpi 160 for mdpi and 120
now your images will increase in size now scale them as mentioned by ajay in above answer
How can i increase the size of launcher icons . I know that my custom launcher is taking images from the drawable-mdpi folder & the allowed icon size is 48x48 . I cant increase the size of launcher icon more than this.
Please help me
the icon of luacher it prepered by system itself you just put in your resources the icons for each vervion and below the standard size for each version
LDPI - 36 x 36
MDPI - 48 x 48
HDPI - 72 x 72
XHDPI - 96 x 96
WEB - 512 x 512
There was two way
1. Create your icon using 9-patch with your required size
2. Create different size of icon and put them in different drawable size. For this to know the size for specific like hdpi, mdpi etc just create sample/ open any exiting project which was created in juno(eclipse editor).
Here the specific size detail for different devices
ldpi-36x36
mdpi-48x48
hdpi-72x72
xdpi-96x96
web - 128x128
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.