In need to round the corners of several widget in android, but changing the background to a drawable is no solution here.
Therefore I want to create a drawable which I can place on top of any ui element. Take a look at this image; I need the black part to be transparent and the white part to be solid.
I only know how to create the negative (a rectangle with rounded corners) shape:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid
android:color="@color/colorForegroundTable"
/>
<corners android:radius="10dp" />
<padding
android:left="20dp"
android:top="10dp"
android:right="20dp"
android:bottom="10dp" >
</padding>
</shape>
Any ideas?