bamlab/generator-rn-toolbox

Suggestion: Update this tool to produce the correct sizes for android devices.

robert-stevens opened this issue ยท 4 comments

Hi,

Like some others, my image is not filling the entire the area. Since I am using an image with a gradient, it's important for me that it will the entire area.

I am testing it with Genymotion and using Samsung Galaxy S6.

I have set the gravity to "fill" but then it stretches the image which makes it look really bad.

I then had a look at the device metrics and saw that the images sizes that are produced by your tool are not the standard sizes used by android devices:

https://material.io/devices/

E.g. For the Samsung Galaxy S6 the device is 1440px X 2560px BUT your tool produces 1280px X 1920px. Hence why my splash screen had "padding" around it.

Now I can manually overwrite each image, but that defeats the purpose of this tool.

So back to my suggestion, I believe that if it's possible to produce the correct image sizes while still using the square image as a source, then I should be a good fix for these types of issues.

Rob

found the solution: replace in ./android/app/src/main/res/drawable/launch_screen_bitmap.xml value of android:gravity from center to fill

As @uppercase-army said:

I have set the gravity to "fill" but then it stretches the image which makes it look really bad.

+1 This really does render this pretty useless on android, sad to say!

Hello, we just revamped the generator ๐Ÿ˜

For up to date icon and splashscreen generation please use @bam.tech/react-native-make

The new version handles 3 different types of rendering for the splashscreen image (center, contain) all using a responsive layout, so it should solve your issue ๐Ÿ˜‰