android-components / / ThreadUtils


object ThreadUtils (source)


Name Summary
assertOnUiThread fun assertOnUiThread(): Unit
postToBackgroundThread fun postToBackgroundThread(runnable: Runnable): Unit
fun postToBackgroundThread(runnable: () -> Unit): Unit
postToMainThread fun postToMainThread(runnable: Runnable): Unit
postToMainThreadDelayed fun postToMainThreadDelayed(runnable: Runnable, delayMillis: Long): Unit
setHandlerForTest fun setHandlerForTest(handler: <ERROR CLASS>): Unit

Extension Functions

Name Summary
loadResourceAsString fun Any.loadResourceAsString(path: String): String
Loads a file from the resources folder and returns its content as a string object.