bamlab / react-native-make

A collection of everyday React Native CLI tools
MIT License
761 stars 87 forks source link

Question: react-native android app icons: why isn't the empty space around the image preserved? #50

Closed rahamin1 closed 3 years ago

rahamin1 commented 3 years ago

I have created icons for a react-native app on android.

For example, this is the xxxhdpi icon. The black frame is not part of the image.
It is just for showing the white margins around it:

xxxhdpi

When I install the app, the white margins are removed and the image is displayed as follows on Android 8 (the black background is the wallpaper):

icon on android

I expected the white margins to be kept. How do I keep it?


Image by Peri Priatna from Pixabay

Juliocbr commented 3 years ago

@rahamin1 You have to use adaptive icons for android, so that the icon adapts to a circular shape, with rounded edges, etc. In the documentation there is a link to review just the topic: https://medium.com/google-design/designing-adaptive-icons-515af294c783

rahamin1 commented 3 years ago

Thanks @Juliocbr , but isn't this package supposed to do the work for me?

rahamin1 commented 3 years ago

I used the following instead: https://romannurik.github.io/AndroidAssetStudio/icons-launcher.html