postOnAnimationDelayed

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

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