Answers for "kotlin settext"

2

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")
Posted by: Guest on October-27-2021

Browse Popular Code Answers by Language