I get annoyed at having to write the (very long) 3...
# android
k
I get annoyed at having to write the (very long) 3-possible-constructors header for Android Views over and over, so I made a live template if anyone's interested. Should be able to just copy and paste it into the Kotlin section of your Live Templates:
Copy code
<template name="view" value="class $VIEW$&#10;@JvmOverloads constructor(&#10;    context: Context,&#10;    attrs: AttributeSet? = null,&#10;    defStyle: Int = 0&#10;): $SUPER_VIEW$(context, attrs, defStyle) {&#10;    $END$&#10;}" description="View class with 3 constructors" toReformat="true" toShortenFQNames="true">
  <variable name="VIEW" expression="" defaultValue="" alwaysStopAt="true" />
  <variable name="SUPER_VIEW" expression="" defaultValue="" alwaysStopAt="true" />
  <context>
    <option name="KOTLIN_TOPLEVEL" value="true" />
    <option name="KOTLIN_CLASS" value="true" />
  </context>
</template>