Skip to content

Instantly share code, notes, and snippets.

@danielgomezrico
danielgomezrico / fixed.kt
Last active February 28, 2017 14:04
Android / Kotlin - Using @jvmoverloads tag to avoid multiple "empty" constructors for inheritance (shown with custom android views). (thanks to https://discuss.kotlinlang.org/t/simple-constructors-for-inheritance/1874/2)
class MyCustomView @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null,
defStyleAttr: Int = 0)
: FrameLayout(context, attrs, defStyleAttr){
init {
// ...
}
}