title: Extending a EditText in Android. What am I doing wrong?
body: <p>So I'm trying to get a grasp of using custom controls in Android. But my app crashes on trying to create the activity. Here's the code:</p>
  
  <pre><code>package com.myApp;
  import android.content.Context;
  import android.widget.EditText;
  import android.view.View;
  import android.view.View.OnClickListener;
  
  public class MyEditText extends EditText implements OnClickListener {
  
      public MyEditText(Context context) {
          super(context);
          // TODO Auto-generated constructor stub
      }   
      public void FlashBorder()
      {
          //do some custom action
      }
      @Override
      public void onClick(View v) {
          // TODO Auto-generated method stub
          EditText txt = (EditText) v;
          txt.selectAll();
      }
  }
  </code></pre>
  
  <p>Here's the layout xml:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;com.myApp.MyEditText
       android:id="@+id/edtTaskName"
       android:layout_height="wrap_content"
       android:layout_width="match_parent"/&gt; 
  </code></pre>