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

postDelayed

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

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

view.postDelayed(200) {
    doSomething()
}

Return
the created Runnable