Animation not working in Kotlin

Author: dominik686Created Feb 25, 2022Updated Feb 25, 2022

Hi! This is my code. I want to play an animation on the fab every time it is pressed but for some reason, it is not doing anything.

_binding!!.floatingActionButton.setOnClickListener{
            YoYo.with(Techniques.Shake)
                .duration(700)
                .repeat(5)
                .playOn(_binding!!.floatingActionButton)
        }

Source: daimajia/AndroidViewAnimations