I have a problem with the newest version of Android Studio(> 3) to use the autocomplete for Toast with Kotlin.
In older versions with Java, it was like typing "Toast", then pushing "Tab" button on keyboard to autocomplete this.
Now, in the versions of Android Studio > 3 and Kotlin it is not working.
Anyone know how to achive this?
Go to Settings
> Live Templates
. Under Android
, find Toast
and select it. At the bottom of settings dialog, it says Applicable in Java
. Click Change
button next to it and select Statement
under Kotlin
. Done.
This is not an exact answer for your question but if you are using the anko
library from Jetbrains (and why wouldn't you?) you can simply show a toast with the line toast("some text")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With