0

I'm trying to implement this view

enter image description here

As you can see it had a circle cutting to the left and right of the rectangle

I tried to use this code

<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <item>
        <shape android:shape="rectangle">
            <corners
                android:topLeftRadius="8dp"
                android:topRightRadius="8dp"
                android:bottomLeftRadius="4dp"
                android:bottomRightRadius="4dp" />

            <size
                android:width="300dp"
                android:height="200dp" />
            <solid android:color="#FFFFFF" />
        </shape>
    </item>

    <item
        android:left="-10dp"
        android:right="290dp"
        android:top="40dp"
        android:bottom="40dp">
        <shape android:shape="oval">
            <solid android:color="#00000000" />
        </shape>
    </item>

    <item
        android:left="290dp"
        android:right="-10dp"
        android:top="40dp"
        android:bottom="40dp">
        <shape android:shape="oval">
            <solid android:color="#00000000" />
        </shape>
    </item>

    <item
        android:left="10dp"
        android:right="10dp"
        android:top="50dp">
        <shape android:shape="line">
            <stroke
                android:width="1dp"
                android:color="#EEEEEE"/>

        </shape>
    </item>
</layer-list>

but the result was not showing the cutting circle to the left and right

Is there any way to implement these cutting without loosing the shadow effect of the cart

Abdulmalek Dery
  • 996
  • 2
  • 15
  • 39

0 Answers0