Android - Launcher Icon Size

2019-01-03 03:59发布

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?

13条回答
甜甜的少女心
2楼-- · 2019-01-03 04:05

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:

Android Generate Launcher Icons

  • Next -> Finish to generate icons

generate ic laucher icons

Finally update android:icon name field in AndroidManifest.xml if required.

查看更多
家丑人穷心不美
3楼-- · 2019-01-03 04:05

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.

enter image description here

(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.

enter image description here

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.

enter image description here

查看更多
冷血范
4楼-- · 2019-01-03 04:13

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.

查看更多
趁早两清
5楼-- · 2019-01-03 04:13

Launch image and Slash image size for Google Play Store app submission

  1. 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

  1. 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
查看更多
Deceive 欺骗
6楼-- · 2019-01-03 04:16

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 Try to generate as large icon as possible

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 Iconenter image description here

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 .

查看更多
姐就是有狂的资本
7楼-- · 2019-01-03 04:17

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.

查看更多
登录 后发表回答