androidandroid-jetpack-composeandroid-jetpackandroid-jetpack-compose-text

Icon color is not changing even after changing the fill color in xml file


enter image description here

This is the code of like icon svg and I have changed the color to pink from black, but when I try to display the icon using compose it's appearing as black only as u can see down

enter image description here

The compose code is

Icon(painter = painterResource(id = R.drawable.liked), contentDescription =null )

Solution

  • Try this?

    Icon(painter = painterResource(id = R.drawable.liked), contentDescription = null, 
        tint = Color(0xFFE91E63))