how to add two background in linearlayout
<p>this is my code which changebutton size to rounded but not change color how do i do?  define colors in another file  colors.xml  in value folder
 how i doboth in one code change button shape to rectangle also change color when click???</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&gt;
   &lt;shape 
   android:shape="rectangle" android:padding="10dp"&gt;
 &lt;!-- you can use any color you want I used here gray color--&gt;
 &lt;solid android:color="#E0E0E0"/&gt; 
 &lt;corners
 android:bottomRightRadius="10dp"
 android:bottomLeftRadius="10dp"
android:topLeftRadius="10dp"
  android:topRightRadius="10dp"/&gt;
 &lt;/shape&gt;
 &lt;/item&gt;
 &lt;item android:state_focused="true" android:state_pressed="true" 
        android:drawable="@drawable/blue_color" /&gt; 
  &lt;item android:state_focused="false" android:state_pressed="true" 
        android:drawable="@drawable/red_color" /&gt; 
  &lt;item android:drawable="@drawable/green_color" /&gt;

 &lt;/selector&gt;





  &lt;!-- colors.xml ---&gt;
  &lt;?xml version="1.0" encoding="utf-8"?&gt;
 &lt;resources&gt;
&lt;drawable name="red_color"&gt;#ff0000&lt;/drawable&gt;
 &lt;drawable name="blue_color"&gt;#0000ff&lt;/drawable&gt;
&lt;drawable name="green_color"&gt;#00ff00&lt;/drawable&gt;
 &lt;/resources&gt;
</code></pre>
