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?
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
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With