📜  settext kotlin 代码示例

📅  最后修改于: 2022-03-11 14:53:33.103000             🧑  作者: Mango

代码示例1
//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")