runOnUiThreadEx

fun runOnUiThreadEx(action: Runnable): Boolean

Run action in android UI Thread. This method can be called outside of the application context.

Parameters

action

Target action to execute

fun runOnUiThreadEx(action: Runnable, delay: Long = 0L): Boolean

Run action in android UI Thread with delay. This method can be called outside of the application context.

Parameters

action

Target action to execute

delay

Delay time in milliseconds