CardView - Adding cuts on left and right side with shadow

Viewed 1956

I have to get this type of card design with semi-circle on both side of cardview along with shadows on both card view and semi-circles.

Thanks in advance.

2 Answers

I found a solution here that create a custom view called TicketView. It provide various option to set the radius of the arc and divider options.

You can use it as custom view.

<com.vipulasri.ticketview.TicketView
    android:layout_width="match_parent"
    android:layout_height="160dp"
    android:layout_marginTop="60dp"
    android:layout_marginLeft="20dp"
    android:layout_marginRight="20dp"
    android:id="@+id/ticketView"
    app:orientation="vertical"
    app:scallopRadius="10dp"
    app:showBorder="false"
    app:scallopPositionPercent="50"
    app:showDivider="true"
    app:dividerType="dash"
    app:ticketElevation="14dp"/>
Related