I'm trying to create a drawable shape with different states for my button. So I wrote this:
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:state_pressed="true" android:color="@android:color/black" >
<shape android:shape="rectangle" >
<solid android:color="@color/NEGATIVE_pressed" />
<stroke
android:width="1dp"
android:color="@color/ORANGE" />
<corners android:radius="4dp" />
</shape>
</item>
<item android:state_focused="true" android:color="@android:color/black" >
<shape android:shape="rectangle" >
<solid android:color="@color/NEGATIVE_focused" />
<stroke
android:width="1dp"
android:color="@color/ORANGE" />
<corners android:radius="4dp" />
</shape>
</item>
<item android:color="@android:color/black" >
<shape android:shape="rectangle" >
<solid android:color="@color/NEGATIVE" />
<stroke
android:width="1dp"
android:color="@color/NEGATIVE" />
<corners android:radius="4dp" />
</shape>
</item>
</selector>
Then in my button I use it as android:background="@drawable/btn_negative_selector"
However, I want to draw a bottom border to that shape, to be, something like 3 dp and of different color, but I can't figure out how to do it. I tried searching, but didn't find anything suitable for selector. Any suggestions, please?