runOnGUIThread

fun runOnGUIThread(task: Runnable)

Executes given task on the UI thread. Use this method to update properties of ComponentViews from asynchronous environments like Animation.onFinished events. If no Application has yet been started, the task is executed on the calling Thread. This function is Thread safe.