Android button background is covering up button text



I have a button that looks as I want it. The only issue is that it covers up the text. I know that it covers it and that the text shows behind it, because if I remove the android:background attribute, the text is shown.


My goal is to have the button, with its text on top of the button.


Here is my button:



<Button
android:layout_width="match_parent"
android:layout_height="65dp"
android:layout_margin="30dp"
android:background="@drawable/timecrunchbutton"
android:text="Test"
android:textColor="@color/white"/>


As well as the timecrunchbutton.xml:



<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://ift.tt/nIICcg" >
<item android:state_pressed="true" >
<layer-list xmlns:android="http://ift.tt/nIICcg">
<!-- Top 1dp Shadow -->
<item>
<shape android:shape="rectangle">
<solid android:color="@color/blue" />
<corners android:radius="7dp" />
</shape>
</item>
<!-- Light bottom color -->
<item android:top="1dp">
<shape android:shape="rectangle">
<solid android:color="@color/darkblue" />
<corners android:radius="7dp" />
<stroke android:width="1px" android:color="#248349"/>
<padding
android:top="28dp"
android:bottom="36dp" />
</shape>
</item>
</layer-list>
</item>
<item>
<layer-list xmlns:android="http://ift.tt/nIICcg">
<!-- Bottom 3dp Shadow -->
<item>
<shape android:shape="rectangle">
<solid android:color="@color/darkblue" />
<corners android:radius="7dp" />
</shape>
</item>
<!-- Light top color -->
<item android:bottom="3dp">
<shape android:shape="rectangle">
<solid android:color="@color/blue" />
<corners android:radius="7dp" />
<stroke android:width="1px" android:color="#22A863"/>
<padding
android:top="36dp"
android:bottom="28dp" />
</shape>
</item>
</layer-list>
</item>
</selector>

No comments:

Post a Comment