settext kotlin

//setText()
val textView: TextView = findViewById(R.id.android_text) as TextView
textView.setOnClickListener {
    textView.text = getString(R.string.name)
}
//getText()
 val str: String = textView.text.toString()

 println("test :  $str")
abdullah