title: Making glass like button in Android
body: <p>I am making glass like button by specifying style in gradient.xml file but i am not getting any output and i am using this style to all the buttons of my applications...i am a newbie please help.. Here is my code</p>
  
  <p>gradient.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="false"&gt;
      &lt;shape xmlns:android="http://schemas.android.com/apk/res/android" &gt;
       &lt;gradient 
          android:startColor="#2F000000" 
          android:endColor="#2fDEDEDE"  
          android:angle="270" /&gt;
      &lt;!-- &lt;stroke 
          android:width="1dp" 
          android:color="#bb00ff00" /&gt; --&gt;
      &lt;corners 
          android:radius="3dp" /&gt;
      &lt;padding 
          android:left="10dp" 
          android:top="10dp"
          android:right="10dp" 
          android:bottom="10dp" /&gt;
     &lt;/shape&gt;
   &lt;/item&gt;
   &lt;item android:state_pressed="true" &gt;
     &lt;shape&gt;
      &lt;gradient 
          android:startColor="#2F000000" 
          android:endColor="#2fDEDEDE" 
          android:angle="270" /&gt;
     &lt;!--  &lt;stroke 
          android:width="1dp" 
          android:color="#bb00ff00" /&gt; --&gt;
      &lt;corners 
          android:radius="3dp" /&gt;
      &lt;padding 
          android:left="10dp" 
          android:top="10dp" android:right="10dp" 
          android:bottom="10dp" /&gt;
      &lt;/shape&gt;
   &lt;/item&gt;
   &lt;item&gt;
  &lt;shape&gt;
       &lt;gradient
          android:startColor="#2F000000" 
          android:endColor="#2fDEDEDE" 
          android:angle="180" /&gt;
          &lt;!-- &lt;gradient
          android:startColor="@color/cream_dark"
          android:endColor="@color/cream"
          android:angle="270"/&gt; --&gt;
  
       &lt;!--  &lt;stroke 
          android:width="1dp" 
          android:color="#ffffffff" /&gt;  --&gt;
      &lt;corners
          android:bottomRightRadius="3dp"
          android:bottomLeftRadius="3dp"
          android:topLeftRadius="3dp"
          android:topRightRadius="3dp"/&gt;
      &lt;padding 
          android:left="10dp" 
          android:top="10dp"
          android:right="10dp" 
          android:bottom="10dp" /&gt;
  &lt;/shape&gt;
  </code></pre>
  
  <p></p>
  
  <p></p>