Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to remove button background color
    text
    copied!<p>I searched a lot but I didn't find how to remove the background color from the button which is appearing on the right and left side of button. Can anybody help?</p> <p>My screen looks like <img src="https://i.stack.imgur.com/diujK.jpg" alt="screenshot"></p> <p>No matter what I try I am not able to remove the black portion.</p> <p>Code:</p> <pre><code>&lt;LinearLayout android:orientation="horizontal" android:layout_width="match_parent" android:layout_height="wrap_content" &gt; &lt;Button android:id="@+id/btn_base" android:text="@string/base" android:layout_margin="2dp" android:textColor="#000000" android:background="@drawable/selector_button" android:layout_weight="0.5" android:layout_width="0dp" android:layout_height="30dp"/&gt; &lt;Button android:id="@+id/btn_care" android:text="@string/care" android:layout_margin="2dp" android:textColor="#000000" android:background="@drawable/selector_button" android:layout_weight="0.5" android:layout_width="0dp" android:layout_height="30dp"/&gt; &lt;/LinearLayout&gt; &lt;LinearLayout android:orientation="horizontal" android:layout_width="match_parent" android:layout_height="wrap_content" &gt; &lt;Button android:id="@+id/btn_daily_prize" android:layout_margin="2dp" android:textColor="#000000" android:background="@drawable/selector_button" android:layout_weight="0.5" android:layout_width="0dp" android:layout_height="30dp" android:text="@string/daily_prize" /&gt; &lt;Button android:id="@+id/btn_winner" android:layout_margin="2dp" android:textColor="#000000" android:background="@drawable/selector_button" android:layout_weight="0.5" android:layout_width="0dp" android:layout_height="30dp" android:text="@string/winner" /&gt; &lt;/LinearLayout&gt; &lt;/LinearLayout&gt; </code></pre> <p>@Drawable/selector_button</p> <pre><code>&lt;selector xmlns:android="http://schemas.android.com/apk/res/android" &gt; &lt;item android:state_pressed="true" android:drawable="@drawable/pressed"&gt; &lt;/item&gt; &lt;item android:state_focused="true" android:drawable="@drawable/focused"/&gt; &lt;item android:drawable="@drawable/change"&gt;&lt;/item&gt; &lt;/selector&gt; </code></pre> <p><img src="https://i.stack.imgur.com/m7Ii6.png" alt="enter image description here"> this is the image used with name change.9.png</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload