title: Setting rounded corners and image to a button
body: <p>I am trying to make button'corners round, as well as setting a background image. Though I was able to achieve button with rounded corners, but not to set the image as the background. When I try <code>android:drawableTop:@drawable/filename</code>, the button is again converted to its default shape and text goes below the image, but I want the image as the background, so how to apply both the things(rounded corner and background image) to the button?</p>
  
  <p>I have created an xml file named <code>button_shape</code> in drawable; the code for it is:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;shape xmlns:android="http://schemas.android.com/apk/res/android" 
  
  android:shape="rectangle"
  &gt;
  
  &lt;solid android:color="#ffffff"
       /&gt;
  
  &lt;corners
      android:bottomLeftRadius="20dp"
      android:bottomRightRadius="20dp"
      android:topLeftRadius="20dp"
      android:topRightRadius="20dp" /&gt;
  &lt;stroke android:width="3dp" android:color="#000000" /&gt;
  &lt;/shape&gt;
  </code></pre>
  
  <p>and the main xml file code where I have put the button is:</p>
  
  <pre><code>&lt;Button
      android:id="@+id/button1"
      android:layout_width="150dp"
      android:layout_height="40dp"
      android:layout_marginTop="179dp"
      android:background="@drawable/button_shape"
      android:text="Button"
      android:textColor="#000000" 
      /&gt;
  </code></pre>
  
  <p>Please help me with this.</p>