seekshiva / react-native-remote-svg

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

borderRadius style prop #37

Open Anwati opened 5 years ago

Anwati commented 5 years ago

Hello!

I have an issue with the borderRadius prop. The svg style prop is not using it. ex: <Image style={{borderRadius: 70}} source={getCountryFlagIcon(this.props.country.toLocaleLowerCase())} /> It works when I apply the borderRadius to a parent View but it's having a weird behavior on android. On android, it's rendering the svg with no borderRadius for a second and then apply the style of the parent view. It's the same when I click on the svg, the style of the parent view disappear for a second. Everything works fine on ios.

Any idea about that?

Thank you

seekshiva commented 5 years ago

Can you also try overflow: hidden along with borderRadius, so that the WebView may get properly hidden? borderRadius sometimes used to just draw the radius but allowed the inner content to flow out, so maybe this would help.

Anwati commented 5 years ago

Thank you for you answer, I will try it. But since that, I built it and tried with an android emulator, the svg are not appearing at all :-/