seekshiva / react-native-remote-svg

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

Color is not changing #12

Open Zilleabbas10 opened 6 years ago

Zilleabbas10 commented 6 years ago

Hello, thanku for providing library but i want to change color of svg image un react-native. i am trying to change it with fill: '#222' but not working. Please let me know is this library supporting to change color of svg image or not ??

seekshiva commented 6 years ago

Hi,

Can you show me how you are using the component and where you are setting fill to '#222'?

seekshiva commented 6 years ago

@Zilleabbas10 can you provide some info on this?

NgKhanh commented 6 years ago

How can I set icon's color. Like this, but dont work

<Image
 source={{uri:'https://fluent-panda.appspot.com.storage.googleapis.com/dumbbell.svg'}}
 style={{width:20, height:20, borderColor:'red' }}/> 
WaLinke commented 6 years ago

Same problem for me, cannot change the svg color. Tried with color, tintColor, ...

return(
      <View key={"Categorie-"+item.id}
      style={[{backgroundColor:"white", borderRadius:15,
      marginTop:10}]}>
        <TouchableOpacity onPress={()=>this.onViewItems(index)}
          style={{alignItems:"center"}} >
        <ImageSvg
            source={{ uri: item.image }}
            style={{
              width: window.width - 150,
              height: window.width - 150,
              color: 'red',
            }}

          />
          <Text style={styles.titleCat}>{item.slug}</Text>
        </TouchableOpacity>
      </View>
    );

Everything works fine except the filled color.

mustafaskyer commented 6 years ago

any updates @seekshiva ??