I\'ve created my custom View class:
class CustomCheckBox constructor( context: Context, attrs: AttributeSet? = null ) : ConstraintLayout(context,