I am trying to get a rectangle shape in Android XML (Kotlin) to have an inverted top right border. By this, I mean rather than a curved, rounded top right border going to the left, i'd like it to round off to the right, like a sharp point before going back across the top to top left.
To explain what I mean, please find some screenshots below.
What i'm aiming for
In terms of code so far, using some examples elsewhere on Stack Overflow, I have produced the below. This is quite simply a white shape with a border top left radius, placed over the top of a green-background shape, to the right of a green shape.
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item>
<shape android:shape="rectangle">
<solid android:color="@color/rsMoving"/>
</shape>
</item>
<item android:left="200dp" android:right="30dp" >
<shape android:shape="rectangle">
<solid android:color="@color/rsMoving" />
</shape>
</item>
<item android:left="200dp" android:right="0dp" >
<shape android:shape="rectangle">
<corners
android:topLeftRadius="50dp"/>
<solid android:color="#FFFFFF" />
</shape>
</item>
</layer-list>
In terms of research, i've had a look at some examples, such as this, but having tried to add other shapes
However I'm looking for some suggestions on how to better produce this, because I don't think fixed dimensions and sizes are going to work. On my screenshots above, the green background text is variable width so ideally I need a shape that will maintain its top right inverted border, but have a dynamically resizing width.
If anyone can point me in the right direction of a top right inverted border i'd be grateful. Thanks