setStateListAnimator

fun View.setStateListAnimator(@AnimatorRes animatorRes: Int?)

Inflates and sets the state list animator resource AnimatorRes to the View, if AnimatorRes is not null. The AnimatorRes is inflated with the AnimatorInflater. If AnimatorRes is null, the previous state list animator, if any, is detached from the view.