Animation on Floating Action Button

0

Does anyone know how to do the Floating Action Button animation shown in the video below?

link

I unpacked the apk of this app and I could see that this animation is not done with resources, but via code (maybe it is possible, but this is not done like this).

    
asked by anonymous 13.01.2015 / 13:24

1 answer

0

Here is the answer:

scale_fab_in.xml

<?xml version="1.0" encoding="utf-8"?>
<scale xmlns:android="http://schemas.android.com/apk/res/android"
    android:duration="500"
    android:fromXScale="0"
    android:fromYScale="0"
    android:pivotX="50%"
    android:pivotY="50%"
    android:toXScale="1"
    android:toYScale="1"
    android:interpolator="@android:interpolator/overshoot"/>

scale_fab_out.xml

<?xml version="1.0" encoding="utf-8"?>
<scale xmlns:android="http://schemas.android.com/apk/res/android"
    android:duration="400"
    android:fromXScale="1"
    android:fromYScale="1"
    android:pivotX="50%"
    android:pivotY="50%"
    android:toXScale="0"
    android:toYScale="0"
    android:interpolator="@android:interpolator/overshoot"/>

From here:

link

    
13.01.2015 / 13:55