13

I want to display app icon (120dpx120dp) in SplashScreen. I am using Splash screens but it display bigger than 120dp. For any vector, it always bigger than 120dp.
After screenshot and calculate by Paint tool, I see that the app icon size in my device (Pixel 4XL) is ~ 160dp. So, if I add a padding 20dp to my app icon, on my Pixel 4XL device, the app icon will look like 120dpx120dp. But I don't know if it work in other device or not?

Aniruddh Parihar
  • 3,072
  • 3
  • 21
  • 39
Linh
  • 57,942
  • 23
  • 262
  • 279

1 Answers1

16

In version 1.0.0-alpha02, splash screen icon size is set to 288dp. If you want to make icon smaller, you can add scale to your vector drawable. Something like this:

<vector
    xmlns:android="http://schemas.android.com/apk/res/android"
    ...
    android:viewportWidth="48"
    android:viewportHeight="48"
    >
    <group
        android:pivotX="24"
        android:pivotY="24"
        android:scaleX="0.25"
        android:scaleY="0.25"
        >
        <path
            ...
            />
        <path
            ...
            />
    </group>
</vector>

This would resize your splash screen icon to 72dp.

Marek
  • 201
  • 2
  • 7
  • 2
    when using branding icon via android:windowSplashScreenBrandingImage, scaling logic is the same but icon size is 200dp x 80dp, might be helpful – Martin.M Nov 12 '21 at 14:25
  • 1
    I find that devices have different splash screen icon size: one has 144dp, another has 288dp, another has 432dp – new Dec 17 '21 at 10:53
  • Is it possible to make the icon bigger? I find the sizes specified in the Android documentation to be very creatively limiting – Andrew S Jan 25 '22 at 02:54
  • Using scaleX and scaleY leads to different icon sizes on different devices, e. g. Samsung devices show a lot smaller icon than the emulator. – masewo Feb 13 '22 at 06:26
  • Where do I make this change? @Marek – Rohit Singh Apr 20 '22 at 21:11
  • @masewo I've run into the same issue as you (Samsung Galaxy S21 shows the splash icon a lot smaller than other devices), were you able to solve this problem? If so, can you please share your approach? – A Random Android Dev Jan 25 '23 at 20:04
  • @ARandomAndroidDev Sadly no. I ended up making it pixel perfect just for Samsung devices, so in my case of my Flutter application this was the result: `` – masewo Jan 26 '23 at 21:55