how I can update a TextView in other file, not MainActivity.kt?
o
Olenyov Kirill
05/29/2020, 9:39 AM
Could you rephrase your question?) I believe it’s not very clear what you need..
i
Ifvwm
05/29/2020, 11:07 AM
there's a TextView in activity_main.xml, I can use findViewById to update text on that TextView in MainActivity.kt, but findViewById is not resolved in other file like AnotherClass.kt
i
Imran
05/29/2020, 11:08 AM
findViewById you will not get in other class. if you have to use textview in other class, then pass textview object in that class
o
Olenyov Kirill
05/29/2020, 11:11 AM
Or you need to have another activity/fragment in your AnotherClass.kt inflated with activity_main.xml