Android - Any way to style a button background but leave the rest as it was?
<p>Is there any way in Android to style the background gradient of a button without altering the rest of it? </p>

<p>I wanted to make a button that was just like a regular button but with a different gradient.   I made a 3x3 grid of buttons in a table layout.   The first button was like the XML here, the others had no background attribute.  </p>

<pre><code>   &lt;Button android:id="@+id/DemoButton"
    android:layout_width="105sp"
    android:layout_height="105sp"
    android:background="@drawable/button1"
    android:onClick="theButtonHandler"
    android:text="Fee"&gt;
  &lt;/Button&gt;
</code></pre>

<p>My style was like this . . . </p>

<pre><code>&lt;selector
xmlns:android="http://schemas.android.com/apk/res/android"&gt;
 &lt;item android:state_pressed="true" &gt;
   &lt;shape&gt;
      &lt;gradient
         android:startColor="#5555AA"
         android:endColor="#000033"
         android:angle="270" /&gt;
   &lt;/shape&gt;
 &lt;/item&gt;
 &lt;item&gt;
   &lt;shape&gt;
      &lt;gradient
         android:startColor="#BBBBDD"
         android:endColor="#BB9988"
         android:angle="270"/&gt;
      &lt;corners android:bottomRightRadius="3dp" android:bottomLeftRadius="3dp"
          android:topLeftRadius="3dp" android:topRightRadius="3dp"/&gt;
    &lt;/shape&gt;
  &lt;/item&gt;
&lt;/selector&gt;
</code></pre>

<p>I had to put the corner radii in because the new button had sharp 90 degree corners.     The result looked like this:
<img src="http://i.stack.imgur.com/RW5vO.jpg" alt="enter image description here"></p>

<p>. . . It's bigger than the other buttons and I had to code-in rounded corners,even though the only attribute I was changing was the "android:background". How can I just change the background?     Thanks in advance!!</p>
