title: How to grey out a button?
body: <p>I have a button defined as shown below. When I want to disable it I use <code>my_btn.setEnabled(false)</code>, but I would also like to grey it out. How can I do that?</p>
  
  <p>Thanks</p>
  
  <pre><code>&lt;Button android:id="@+id/buy_btn" style="@style/srp_button" /&gt;
  </code></pre>
  
  <p><b>style/srp_button</b></p>
  
  <pre><code>&lt;style name="srp_button" parent="@android:style/Widget.Button"&gt;
      &lt;item name="android:background"&gt;@drawable/btn_default&lt;/item&gt;
      &lt;item name="android:layout_width"&gt;wrap_content&lt;/item&gt;
      &lt;item name="android:layout_height"&gt;wrap_content&lt;/item&gt;
      &lt;item name="android:textColor"&gt;#ffffff&lt;/item&gt;
      &lt;item name="android:textSize"&gt;14sp&lt;/item&gt;
      &lt;item name="android:typeface"&gt;serif&lt;/item&gt;
      &lt;item name="android:paddingLeft"&gt;30dp&lt;/item&gt;
      &lt;item name="android:paddingRight"&gt;30dp&lt;/item&gt;
      &lt;item name="android:paddingTop"&gt;5dp&lt;/item&gt;
      &lt;item name="android:paddingBottom"&gt;5dp&lt;/item&gt;
  &lt;/style&gt;
  </code></pre>
  
  <p><b>drawable/btn_default.xml</b></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;shape xmlns:android="http://schemas.android.com/apk/res/android"&gt;
      &lt;solid android:color="@color/pink" /&gt;
      &lt;corners android:radius="6dp" /&gt;
  &lt;/shape&gt;
  </code></pre>