When I create a custom FrameLayout I need to implement those 3 constructors but as you see all of them just call super(...) and init() .

class VideoView : FrameLayout { constructor(context: Context) : super(context) { init() } constructor(context: Context, attrs: AttributeSet) : super(context, attrs) { init() } constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int) : super(context, attrs, defStyleAttr) { init() } fun init(){ ... } }