I have couple buttons that I need an oval shaped border.
So i have this in a capsule_border.xml
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="9999dp"/>
<stroke
android:width="1px"
android:color="@color/border_gray" />
</shape>
And I would use android:background="@drawable/capsule_border.xml
where I need it.
Now, I would like to have a button to have this oval shaped border, but also a android:background="?selectableItemBackground"
for the visual feedback.
I tried to use a parent layout with the selectableItembackground and button with capsule_border. But it seems that the clickable area that gets highlighted is the whole square. Instead of only the area within the capsule border.
Is there someway that I can make it so that the selectableItemBackground does not highly the whole rectangle of the view, but only within the border that i draw?