-2

I have created a Trusted Web activity and added a splash image to it in android studio. I have followed this link to do it. After a lot of googling, I was able to do it. Now I want to resize the splash image. How can I do it?

1 Answers1

0

If you want to make the image that is part of the splash screen larger, you will need to add a larger version of that image to the project's source code.

From the article linked, the images should be somewhere like res/drawable/ic_splash.png. Replacing this image with a larger version should result in a larger image in the splash screen.

Additionally, you will want to look into Android screen densities. Those are alternate images you can provide for screens that have higher resolution and are preferred by Android over the one in the drawable folder.

As an example, let's say you want the image to be 512px by 512px at the baseline mdpi. You would need:

DPI Path Multiplier Image Size
ldpi /res/drawable-ldpi/ 0.75 384x384px
mdpi (baseline) /res/drawable/ 1.0 512x512px
hdpi /res/drawable-hdpi/ 1.5 768x768px
xhdpi /res/drawable-xhdpi/ 2.0 1024x1024px
xxhdpi /res/drawable-xxhdpi/ 3.0 1536x1536px
xxxhdpi /res/drawable-xxxhdpi/ 3.0 2048x2048px
andreban
  • 4,621
  • 1
  • 20
  • 49