Button background as transparent
<p>I have a button. When I press the button I have to make text as bold otherwise normal. So I wrote styles for bold &amp; normal.</p>

<pre><code>&lt;style name="textbold" parent="@android:style/TextAppearance"&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:textStyle"&gt;bold&lt;/item&gt;
&lt;/style&gt;
&lt;style name="textregular" parent="@android:style/TextAppearance"&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:textStyle"&gt;normal&lt;/item&gt;
&lt;/style&gt;
</code></pre>

<p>Now I have a button_states.xml as:</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="true" android:state_pressed="true"
    style="@style/textbold" /&gt;
&lt;item android:state_focused="false" android:state_pressed="true"
    style="@style/textregular" /&gt;

&lt;item style="@style/textregular" /&gt;
&lt;/selector&gt; 
</code></pre>

<p>In my layout for this button, I have to make the background as transparent too...How will I do it? My layout code is :</p>

<pre><code>&lt;Button android:id="@+id/Btn" android:background="@drawable/button_states" /&gt;
</code></pre>

<p>How will I include background as transparent in my style?</p>
