title: Extending Button class
body: <p>Please help me to solve my problem. I'm trying to create a button with some extra functionality. But when I extend class Button, a rendering problem appears :"Custom view GameButton is not using the 2- or 3-argument View constructors; XML attributes will not work". I really have no idea where the problem is, because I add all constructors to my class GameButton:</p>
  
  <pre><code>package ua.oksana.sendev.tictactoe
  import android.annotation.TargetApi;
  import android.content.Context;
  import android.os.Build;
  import android.util.AttributeSet;
  import android.widget.*;
  
  public class GameButton extends Button {
  private int parentId;
  private int cellId;
  
  
  public GameButton(Context context) {
      super(context);
  }
  public GameButton(Context context, AttributeSet attrs) {
      super(context, attrs);
  }
  public GameButton(Context context, AttributeSet attrs, int defStyleAttr) {
      super(context, attrs, defStyleAttr);
  }
  
  @TargetApi(Build.VERSION_CODES.L)
  public GameButton(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
      super(context, attrs, defStyleAttr, defStyleRes);
  }
  
  public void setParentId(int parentId){
      this.parentId=parentId;
  }
  
  public void setCellId(int cellId){
      this.cellId=cellId;
  }
  
  public int getParentId(){
      return this.parentId;
  }
  
  public int getCellId(){
     return this.cellId;
  }
  
  }
  </code></pre>
  
  <p>And XML:</p>
  
  <pre><code> &lt;ua.oksana.sendev.tictactoe.tools.GameButton
                      style="@style/cellStyle"
                      android:id="@+id/button99"
                      android:layout_column="3" /&gt;
  </code></pre>
  
  <p>style:</p>
  
  <pre><code>   &lt;style name="cellStyle"&gt;
      &lt;item name="android:layout_width"&gt;0dp&lt;/item&gt;
      &lt;item name="android:layout_height"&gt;wrap_content&lt;/item&gt;
      &lt;item name="android:buttonStyle"&gt;?android:attr/buttonStyleSmall&lt;/item&gt;
      &lt;item name="android:layout_weight"&gt;1&lt;/item&gt;
  &lt;/style&gt;
  </code></pre>