-1

How to achieve this push effect seen in recycler view below the image

enter image description here

Devrath
  • 42,072
  • 54
  • 195
  • 297

1 Answers1

0

From @Chirag answer which is been deleted

I achieved this using. Best part is I don't need to use a third party library

https://evgenii.com/blog/spring-button-animation-on-android/

anim class:

<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android" >

    <scale
            android:duration="200"
            android:fromXScale="0.9"
            android:toXScale="1.0"
            android:fromYScale="0.9"
            android:toYScale="1.0"
            android:pivotX="50%"
            android:pivotY="50%" />
</set>

code::

val myAnim = AnimationUtils.loadAnimation(context, R.anim.bounce)
view.startAnimation(myAnim)
Devrath
  • 42,072
  • 54
  • 195
  • 297