title: How to set text content Custom TextView in Kotlin
body: <p>I just create custom TextView in Kotlin named MyTextView and XML layout also.</p>
  
  <pre><code>
   class MyTextView : TextView 
  {
   constructor(context: Context) : super(context)
   {
       init()
   }
  
   constructor(context: Context, attrs: AttributeSet) : super(context, attrs)
   {
       init()
   }
  
   constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int) : super(context, attrs, defStyleAttr)
   {
       init()
   }
  
   private fun init()
   {
       this.paintFlags = this.paintFlags or Paint.UNDERLINE_TEXT_FLAG
   }
  }
  
  </code></pre>
  
  <pre><code>&lt;com.mypackage.MyTextView
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:id="@+id/mytextview"
  /&gt;
  </code></pre>
  
  <p>But when I tried to set text like below</p>
  
  <pre><code>mytextview.text = "hi"
  </code></pre>
  
  <p>it says, unresolved reference. What to do?</p>
  
  <p>It works for normal TextView.</p>