title: Changing TextView Background color on touch
body: <p>I want to change Background color of a textview when click or touch it.
  this is textview</p>
  
  <pre><code>&lt;com.example.shuvo.KeyboardButton
                  android:id="@+id/showMenuButton"
                  style="@drawable/color"
                  android:layout_width="wrap_content"
                  android:layout_height="match_parent"
                  android:layout_weight="2"
                  android:alpha="0.8"
                  android:text="Menu"
                  android:textColor="@drawable/text_link_selector"
                  android:background="@drawable/keyboard"
                   /&gt;
  </code></pre>
  
  <p>In keyboard.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;selector xmlns:android="http://schemas.android.com/apk/res/android"&gt;
  &lt;item android:state_focused="true"&gt;  &lt;color android:color="#00ff00" /&gt; &lt;/item&gt;
  </code></pre>
  
  <p> </p>
  
  <p></p>
  
  <p>And in keyboardButton.java</p>
  
  <pre><code>public class KeyboardButton extends TextView {
  
  public KeyboardButton(Context context, AttributeSet attrs, int defStyle) {
      super(context, attrs, defStyle);
  }
  
  public KeyboardButton(Context context, AttributeSet attrs) {
      super(context, attrs);
  }
  
  public KeyboardButton(Context context) {
      super(context);
  }
  
  public void setLayoutParams(int width, int height) {
      LayoutParams params = new LayoutParams(width, 60);
      this.setLayoutParams(params);
      setBackgroundResource(R.drawable.keyboard);
      setPadding(10, 10, 10, 10);
  }
  </code></pre>
  
  <p>}</p>
  
  <p>This not working. Where is the problem?</p>