I have created a custom button and placed it in drawable folder, code as below for it:
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#f50057" />
<padding
android:left="30dp"
android:top="0dp"
android:right="30dp"
android:bottom="0dp" />
<corners android:radius="5dp" />
</shape>
I am using the above as background for the button, the button is occupying too much space vertically eventhough I have put the padding as 0dp for it. Can you please help me reduce the space occupied by button vertically.
Code in layout:
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/start_button"
android:background="@drawable/myrect"
android:focusable="false"
android:text="Start"
android:layout_below="@+id/expandview"
android:layout_centerHorizontal="true" />