I am new to Kotlin development in android. here I am trying to access a variable defined in a class from it\'s inner class as below.
class MainActivity : Ap
to answer this question for the fast an easy way i would do something like following :
class OuterClass{ private var accessibleInside: CustomObject? = null inner class InnerClass{ //.... }
now the CustomObject could be anything from Context to String hope this helps someone.
CustomObject
Context
String