In CardView XML: android:animateLayoutChanges="true"
and also the following in the code:
((androidx.cardview.widget.CardView) findViewById(R.id.view)).getLayoutTransition().enableTransitionType(LayoutTransition.CHANGING);
Check FastOutSlowInInterpolator
val timeInterpolator = FastOutLinearInInterpolator()
view.animate().translationY(SOME_VALUE).setDuration(200L).setInterpolator(timeInterpolator).start()