-3
    <?xml version="1.0" encoding="utf-8"?>
<vector android:height="24dp"
    android:viewportHeight="628.0"
    android:viewportWidth="726.0"
    android:width="27dp"
    xmlns:android="http://schemas.android.com/apk/res/android">
    <path
        android:fillColor="#00ffffff"
        android:pathData="m723,314c-60,103.9 -120,207.8 -180,311.8 -120,0 -240,0 -360,0C123,521.8 63,417.9 3,314 63,210.1 123,106.2 183,2.2c120,0 240,0 360,0C603,106.2 663,210.1 723,314Z"
        android:strokeColor="#000000"
        android:strokeWidth="4"/>
</vector>

I want to change the fillColor section at runtime so that I can reuse this shape for multiple use.

  • Possible duplicate of [Change fillColor from vector in android programmatically](https://stackoverflow.com/questions/33126904/change-fillcolor-from-vector-in-android-programmatically) – Karan Shishoo Mar 02 '18 at 04:36

1 Answers1

0

You have to try like this

DrawableCompat.setTint(myImageView.getDrawable(), ContextCompat.getColor(context, R.color.new_color));

Note: myImageView your image view object

Raja
  • 2,775
  • 2
  • 19
  • 31