Hello, I have a problem when I use Kotlin in Andro...
# android
l
Hello, I have a problem when I use Kotlin in Android. I create a handler using
Copy code
kotlin
val handler: Handler = object : Handler() {
        override fun handleMessage(msg: Message) {
            when (msg.what) {
                0 -> { fab_next.show() }
            }
            super.handleMessage(msg)
        }
    }
and Android Studio told me
This Handler class should be static or leaks might occur
,but kotlin doesn't have
static
,So what should I do for this? 2 replies This delegate can help you: https://gist.github.com/LouisCAD/7ce3a30cb88c27858b12d5f26c118b0b