If you are migrating from building android apps using java to kotlin, there are a lot of features you are used to that you would also want to see in kotlin.
For instance in Android Studio java, you can create a toast message by typing the shortcut “Toast”. This feature is not eenabled by default in Kotlin. This tutorial would put you through the step by step process on how you can enable toast shortcut in Kotlin.
Whats going on is that the Toast live template shortcut is only enabled for java language in Android studio, so you need to enter the settings and enable it for kotlin. Follow the below steps.
Step 1: Open Settings
WIndows: Click File > Settings
macOS: Android Studio > Preferences
Step 2: Enable Toast for kotlin
- Expand the ‘Android’ option
- Click on ‘Toast’ from the expanded options