Hello, guys. I'm trying use ``` when (acti...
# android
q
Hello, guys. I'm trying use
Copy code
when (actionId) {
            EditorInfo.IME_ACTION_DONE -> {
                action(getValueForNumberDialog(editText))
                return true
            }
            else -> return@setOnEditorActionListener false
        }
with if all works fine.
Copy code
if (actionId == EditorInfo.IME_ACTION_DONE) {
        action(getValueForNumberDialog(editText))
        return true
    } else {
        return@setOnEditorActionListener false
    }
Please help me with when state