bamlab / react-native-make

A collection of everyday React Native CLI tools

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

rahamin1 opened this issue · comments

commented

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

@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

commented

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