0
I am working on a bluetooth android application that will need to display some data to the screen… I have a layot kotlin file and I have a seperate BluetoothService.kt file for bluetooth connection. I have established the connection now i have problems displaying data to the layout.
How do I access the TextView from the bluetooth class? I have tried creating a function test
that would change the textview, but I cannot access it from bluetooth class.
class data_display_tab : AppCompatActivity(){
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.data_display)
toHeight.setOnClickListener {
startActivity(Intent(this, lift_tab::class.java))
}
}
fun test()
{
weight_frontleft.text = "Hello"
}
}