Last active
December 7, 2017 14:50
-
-
Save GrzegorzDyrda/83499ae0b6c7a878b9be43c8c46e11e7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Created by Grzegorz Dyrda on 2017-12-07 | |
*/ | |
import android.os.Handler | |
import android.os.Looper | |
private val mainHandler = Handler(Looper.getMainLooper()) | |
fun postOnUiThread(action: () -> Unit) { | |
mainHandler.post(action) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment