I'm trying to make mu custom button with no padding. For that purpose I created following selector:
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" >
<shape>
<solid
android:color="#33b5e5"/>
<corners
android:radius="1dp" />
<padding
android:left="0dp"
android:top="0dp"
android:right="0dp"
android:bottom="0dp" />
</shape>
</item>
<item android:state_focused="true" >
<shape>
<solid
android:color="#cccccc"/>
<corners
android:radius="1dp" />
<padding
android:left="0dp"
android:top="0dp"
android:right="0dp"
android:bottom="0dp" />
</shape>
</item>
<item>
<shape>
<solid
android:color="#cccccc"/>
<corners
android:radius="1dp" />
<padding
android:left="0dp"
android:top="0dp"
android:right="0dp"
android:bottom="0dp" />
</shape>
</item>
</selector>
I define my Button in xml file:
<Button
android:text="Some text"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:background="@drawable/button_selector"
android:textSize="45sp"
android:paddingBottom="0dp"
android:paddingTop="0dp"
android:layout_margin="3dip"/>
But there is always padding on the top and on the bottom of the button. I've already searched SO and found some answers but nothng helped me. What could be the problem?