Fliping Drawable Image in Vector Drawable Fliping Drawable Image in Vector Drawable xml xml

Fliping Drawable Image in Vector Drawable


You were almost doing it, just with the wrong pivot point.

It needs to flip around the centre of the image, so looking at the viewport the full width is 24, so the pivot point needs to be at 12.

<vector xmlns:android="http://schemas.android.com/apk/res/android"    android:width="24dp"    android:height="24dp"    android:viewportHeight="24"    android:viewportWidth="24">    <group        android:name="rotationGroup"        android:pivotX="12"        android:scaleX="-1" >        <path            android:fillColor="#FFFFFF"            android:pathData="M15,14C17.67,14 23,15.33 23,18V20H7V18C7,15.33 12.33,14 15,14M15,12A4,4 0 0,1 11,8A4,4 0 0,1 15,4A4,4 0 0,1 19,8A4,4 0 0,1 15,12M5,9.59L7.12,7.46L8.54,8.88L6.41,11L8.54,13.12L7.12,14.54L5,12.41L2.88,14.54L1.46,13.12L3.59,11L1.46,8.88L2.88,7.46L5,9.59Z" />    </group></vector>