• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Kotlin UI Object From Class File

Brian Berry

Well-Known Member
I'm learning Kotlin and its going great but I can't find how to do the following.

How do I call a UI object from within a class file?

I tried:

Code:
ImageView (context0).missleright0.setOnClickListener {}

But I get a null pointer exception
 
Back
Top Bottom