0

The equivalent Kotlin code of the answer. Android Studio also transforms Java code into Kotlin automatically. Just copy and paste it.
Edit for activity :
val toast = Toast.makeText(this, "Text" , Toast.LENGTH_SHORT)
//the default toast view group is a relativelayout
val toastLayout = toast.getV...