Getting Android vector drawable as Path

val vectorDrawable = ResourcesCompat.getDrawable(resources, R.drawable.icon, null)  vectorDrawable?.setBounds(0, 0, 800, 800) vectorDrawable?.draw(canvas)
<path     
android:fillColor="#FF000000"
android:pathData="M17.6,9.48l1.84,-3.18c0.16,-0.31 0.04,-0.69 -0.26,..."/>
path.moveTo(17.6f, 9.48f) path.lineTo(19.44f, 6.3f) path.cubicTo(19.6f, 5.99f, 19.48f, 5.61f, 19.18f, 5.45f)
import androidx.core.graphics.PathParser  PathParser.createPathFromPathData(pathData)

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store