Why does Kotlin complains about this:
class MyActivity : Activity { private var handler:Handler = Handler() private var runnable: Runnable = Runnable {
You can also use
private var runnable: Runnable = Runnable { /* Do something very important */ handler.postDelayed(runnable(), 5000) } private fun runnable() = runnable