Mr. Robot
Mr. Robot

Reputation: 1824

Android app icon is always smaller than it should be

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:

enter image description here

Here is the shape of the source image for ic_launcher_round:

enter image description here

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?

Upvotes: 2

Views: 1852

Answers (1)

高鵬翔
高鵬翔

Reputation: 2057

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

Upvotes: 0

Related Questions