Kotlin autocomplete in android studio isn't showing all available suggestion.
The same code snippet in Java suggests setErrorEnabled()
I tried restarting IDE, invalidate cache but still don't work as it used to do in Java.
How do I fix this?
CodePudding user response:
Use textPasswordInput.isErrorEnabled = true
. Kotlin converts Java getters and setters into Kotlin properties. It still allows you to call setErrorEnabled
but since the property syntax is preferred, it doesn’t include the setter method in the autocomplete. Notice your use of the setter is highlighted with a warning.