Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Button: AppCompatButton {
- constructor(context: Context, attrs: AttributeSet, defStyle: Int) : super(context, attrs, defStyle) {
- }
- constructor(context: Context, attrs: AttributeSet) : super(context, attrs) {
- }
- constructor(context: Context) : super(context) {
- }
- //Some custom implementation
- //............
- }
- class TextView: AppCompatTextView {
- constructor(context: Context, attrs: AttributeSet, defStyle: Int) : super(context, attrs, defStyle) {
- }
- constructor(context: Context, attrs: AttributeSet) : super(context, attrs) {
- }
- constructor(context: Context) : super(context) {
- }
- //Some custom implementation
- //............
- }
- abstract class BaseView<T : View> : T {
- constructor(context: Context, attrs: AttributeSet, defStyle: Int) : super(context, attrs, defStyle) {
- }
- constructor(context: Context, attrs: AttributeSet) : super(context, attrs) {
- }
- constructor(context: Context) : super(context) {
- }
- }
- interface ViewConstructor {
- constructor(context: Context, attrs: AttributeSet, defStyle: Int) : super(context, attrs, defStyle) {
- }
- constructor(context: Context, attrs: AttributeSet) : super(context, attrs) {
- }
- constructor(context: Context) : super(context) {
- }
- }
- class CustomView @JvmOverloads constructor(
- context: Context,
- attrs: AttributeSet? = null,
- defStyleAttr: Int = 0,
- defStyleRes: Int = 0
- ) : View(context, attrs, defStyleAttr, defStyleRes) {
- }
Advertisement
Add Comment
Please, Sign In to add comment