<?xml version="1.0" encoding="utf-8"?>
<animated-selector xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:aapt="http://schemas.android.com/aapt">
    <item
        android:id="@+id/normal"
        android:drawable="@drawable/ic_play"
        android:state_activated="false" />
    <item
        android:id="@+id/activated"
        android:drawable="@drawable/ic_pause"
        android:state_activated="true" />

    <transition
        android:fromId="@id/normal"
        android:toId="@id/activated">
        <aapt:attr name="android:drawable">
            <animated-vector>
                <aapt:attr name="android:drawable">
                    <vector
                        android:width="24dp"
                        android:height="24dp"
                        android:viewportWidth="24"
                        android:viewportHeight="24">
                        <group
                            android:name="group"
                            android:pivotX="12"
                            android:pivotY="12">
                            <path
                                android:name="path"
                                android:fillColor="#fff"
                                android:pathData="M 8 5 L 8 19 L 19 12 Z"
                                android:strokeWidth="1" />
                        </group>
                    </vector>
                </aapt:attr>
                <target android:name="path">
                    <aapt:attr name="android:animation">
                        <objectAnimator
                            android:duration="300"
                            android:interpolator="@android:interpolator/fast_out_slow_in"
                            android:propertyName="pathData"
                            android:valueFrom="M 8 5 L 8 12 L 19 12 L 19 12 L 8 5 M 8 12 L 8 19 L 19 12 L 19 12 L 8 12"
                            android:valueTo="M 5 6 L 5 10 L 19 10 L 19 6 L 5 6 M 5 14 L 5 18 L 19 18 L 19 14 L 5 14"
                            android:valueType="pathType" />
                    </aapt:attr>
                </target>
                <target android:name="group">
                    <aapt:attr name="android:animation">
                        <objectAnimator
                            android:duration="300"
                            android:interpolator="@android:interpolator/fast_out_slow_in"
                            android:propertyName="rotation"
                            android:valueFrom="0"
                            android:valueTo="90"
                            android:valueType="floatType" />
                    </aapt:attr>
                </target>
            </animated-vector>
        </aapt:attr>
    </transition>
    <transition
        android:fromId="@id/activated"
        android:toId="@id/normal">
        <aapt:attr name="android:drawable">
            <animated-vector>
                <aapt:attr name="android:drawable">
                    <vector
                        android:width="24dp"
                        android:height="24dp"
                        android:viewportWidth="24"
                        android:viewportHeight="24">
                        <group
                            android:name="group"
                            android:pivotX="12"
                            android:pivotY="12">
                            <path
                                android:name="path"
                                android:fillColor="#fff"
                                android:pathData="M 8 5 L 8 19 L 19 12 Z"
                                android:strokeWidth="1" />
                        </group>
                    </vector>
                </aapt:attr>
                <target android:name="path">
                    <aapt:attr name="android:animation">
                        <objectAnimator
                            android:duration="300"
                            android:interpolator="@android:interpolator/fast_out_slow_in"
                            android:propertyName="pathData"
                            android:valueFrom="M 5 6 L 5 10 L 19 10 L 19 6 L 5 6 M 5 14 L 5 18 L 19 18 L 19 14 L 5 14"
                            android:valueTo="M 8 5 L 8 12 L 19 12 L 19 12 L 8 5 M 8 12 L 8 19 L 19 12 L 19 12 L 8 12"
                            android:valueType="pathType" />
                    </aapt:attr>
                </target>
                <target android:name="group">
                    <aapt:attr name="android:animation">
                        <objectAnimator
                            android:duration="300"
                            android:interpolator="@android:interpolator/fast_out_slow_in"
                            android:propertyName="rotation"
                            android:valueFrom="90"
                            android:valueTo="0"
                            android:valueType="floatType" />
                    </aapt:attr>
                </target>
            </animated-vector>

        </aapt:attr>
    </transition>
</animated-selector>
