SHARE
TWEET

Untitled

a guest Feb 22nd, 2019 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class Button: AppCompatButton {
  2.  
  3.     constructor(context: Context, attrs: AttributeSet, defStyle: Int) : super(context, attrs, defStyle) {
  4.     }
  5.  
  6.     constructor(context: Context, attrs: AttributeSet) : super(context, attrs) {
  7.     }
  8.  
  9.     constructor(context: Context) : super(context) {
  10.     }
  11.     //Some custom implementation
  12.     //............
  13. }
  14.  
  15. class TextView: AppCompatTextView {
  16.  
  17.     constructor(context: Context, attrs: AttributeSet, defStyle: Int) : super(context, attrs, defStyle) {
  18.     }
  19.  
  20.     constructor(context: Context, attrs: AttributeSet) : super(context, attrs) {
  21.     }
  22.  
  23.     constructor(context: Context) : super(context) {
  24.     }
  25.     //Some custom implementation
  26.     //............
  27. }
  28.      
  29. abstract class BaseView<T : View> : T {
  30.     constructor(context: Context, attrs: AttributeSet, defStyle: Int) : super(context, attrs, defStyle) {
  31.     }
  32.  
  33.     constructor(context: Context, attrs: AttributeSet) : super(context, attrs) {
  34.     }
  35.  
  36.     constructor(context: Context) : super(context) {
  37.     }
  38. }
  39.      
  40. interface ViewConstructor {
  41.     constructor(context: Context, attrs: AttributeSet, defStyle: Int) : super(context, attrs, defStyle) {
  42.     }
  43.  
  44.     constructor(context: Context, attrs: AttributeSet) : super(context, attrs) {
  45.     }
  46.  
  47.     constructor(context: Context) : super(context) {
  48.     }
  49. }
  50.      
  51. class CustomView @JvmOverloads constructor(
  52.         context: Context,
  53.         attrs: AttributeSet? = null,
  54.         defStyleAttr: Int = 0,
  55.         defStyleRes: Int = 0
  56. ) : View(context, attrs, defStyleAttr, defStyleRes) {
  57.  
  58. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top