core-ktx / androidx.view / android.view.View / postOnAnimationDelayed

postOnAnimationDelayed

inline fun View.postOnAnimationDelayed(delayInMillis: Long, crossinline action: () -> Unit): Runnable

Version of View.postOnAnimationDelayed which re-orders the parameters, allowing the action to be placed outside of parentheses.

view.postOnAnimationDelayed(16) {
    doSomething()
}

Return
the created Runnable