so, if I have a Java class with three constructors...
# announcements
r
so, if I have a Java class with three constructors that I’m extending, is there a way to call a different
super
constructor based on the parameters supplied?
r
You can use @jvmoverload
for example
Copy code
class CustomView @JvmOverload constructor(
      context: Context,
      attr: AttributeSet? = null,
      defStyle : Int = 0) : LinearLayout(context, attr, defstyle) {

     init {}
}