How to programmatically change a vector path
I want to add vectorDrawable to my google map, I need to change the value of vector pathData when user touches the map, is there any way to change it? Or is there a way to create a vector with pathData programmatically?
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:name="path1"
android:fillColor="#FF000000"
android:pathData="M9,2c-1.05,0 -2.05,0.16 -3,0.46 4.06,1.27 7,5.06 7,9.54 0,4.48 -2.94,8.27 -7,9.54 0.95,0.3 1.95,0.46 3,0.46 5.52,0 10,-4.48 10,-10S14.52,2 9,2z"/>
+3
source to share
No one has answered this question yet
Check out similar questions: