Aim: Stroke only the top and bottom.
What I've tried:
Below is a copy of my XML. I've tried following the solution in This Stack Overflow Answer. But my problem is that the doesn't let me choose the options of cutting off the left and right by 1dp as per the solution.
Any ideas?
Code:
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true">
<shape >
<gradient
android:startColor="@color/secondaryButtonStartColorSelected"
android:endColor="@color/secondaryButtonEndColorSelected"
android:angle="270" />
<stroke
android:width="@dimen/secondary_button_border_size"
android:color="@color/secondaryButtonBorderColorSelected" />
</shape>
</item>
<item android:state_focused="true" >
<shape>
<gradient
android:startColor="@color/secondaryButtonStartColorSelected"
android:endColor="@color/secondaryButtonEndColorSelected"
android:angle="270" />
<stroke
android:width="@dimen/secondary_button_border_size"
android:color="@color/secondaryButtonBorderColorSelected"/>
</shape>
</item>
</selector>