I have a vector like this
<vector
xmlns:android="http://schemas.android.com/apk/res/android"
android:width="16dp"
android:height="16dp"
android:viewportWidth="16"
android:viewportHeight="16">
<path
android:pathData="M8,8m-8,0a8,8 0,1 1,16 0a8,8 0,1 1,-16 0"
android:fillColor="#1c1c1c" />
<path
android:pathData="m6.7,12 l-3.7,-3.3 1.3,-1.5 2.3,2 4.9,-5.3 1.5,1.3z"
android:fillColor="#fff" />
</vector>
which by default looks like this:
and I want to change the colour of the circle programatically (basically the fillColor of the first path) and keeping the tick white.
I was trying to change the tint of the drawable (by using marker.setTint(tintColor)
and marker.setTintMode(PorterDuff.Mode.XOR)
or any other variation of tintMode) but no matter what I chose or what tintMode combination I tried I was not able to change the colour of the circle.
Either the colour of the tick was changed, or the correct colour was applied but then the shape of the vector (basically the square) was also shown.