Как я могу получить доступ к значениям из strings.xml в Android Kotlin?
class MainActivity : AppCompatActivity(), View.OnClickListener {
override fun onClick(p0: View?) {
getToastCalled("")
TODO("not implemented")
}
private fun getToastCalled(message: String) {
TODO("not implemented")
}
var btn: Button? = null;
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
var tv_name=findViewById(R.id.tv) as TextView
btn=findViewById(R.id.button) as Button
tv_name.setText(KtTest().name);
(btn as Button).setOnClickListener([email protected])
}
}