seekshiva / react-native-remote-svg

Adds support for loading svg images in React Native
MIT License
185 stars 71 forks source link

Android SVG Image Size not respected #9

Closed gwenfisch closed 6 years ago

gwenfisch commented 6 years ago

Hi, It works great on IOS. Thanks.

However, on Android the SVG image size is not respected. It displays a larger image. In my style I've specified the width and height {width:32,height:32}.

The beginning of my svg Image code is the following :

<svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="none" x="0px" y="0px" width="32px" height="32px" viewBox="0 0 32 32"}>

Here you should simply see a cross in the circle, but you can only see the top left of the cross.

capture d ecran 2018-03-12 a 20 17 37

gwenfisch commented 6 years ago

Hi. I have updated react-native-remote-svg. Now it works. My config: Test on Android Platform 23. React Native 0.54.1 React Native Remote SVG 1.1.1

nbolender commented 6 years ago

@gwenfisch Thank you for updating your issue. You just saved me probably hours of troubleshooting :)