kotlin 自定义view构造函数写法

class LoadingPager: FrameLayout  {

    constructor(context: Context): super(context){

    }

    constructor(context: Context, attributeSet: AttributeSet): super(context, attributeSet){

    }

    constructor(context: Context, attributeSet: AttributeSet, defStyleAttr: Int): super(context, attributeSet, defStyleAttr){
        
    }

    init {

    }
}

你可能感兴趣的:(kotlin 自定义view构造函数写法)