Visibility Not working with Kotlin
use play.visibility=View.VISIBLE
to visible and play.visibility=View.GONE
to invisible or to hide
You have a mistake in your code, visibility constant should be set from Class variable, not from argument variable. Change view.INVISIBLE by View.INVISIBLE
fun onPlay(view: View){
var play = findViewById(R.id.play) as Button
play.isClickable=false
play.visibility= View.INVISIBLE // v letter should be capital
}