Этого можно добиться, рисуя розовый слой, а затем рисуя белый слой 1dp
, удаленный от правой границы:
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Pink layer -->
<item android:width="20dp">
<shape android:shape="rectangle">
<solid android:color="@color/colorWhite" />
</shape>
</item>
<!-- white layer. It'll cover the pink layer except the last dp -->
<item android:right="1dp" android:width="19dp">
<shape android:shape="rectangle">
<solid android:color="@color/colorWhite" />
</shape>
</item>
</layer-list>
Возможно, вы можете настроить