Curved rectangle shape from bottom


Desired shape

Is it possible to make this shape for background of components?


Answers:


I recommend using a <vector> drawable for this.

<vector
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="24dp"
    android:height="8dp"
    android:viewportWidth="24.0"
    android:viewportHeight="24.0">

    <path
        android:fillColor="#FFff0000"
        android:pathData="M24 24v-24h-24v24a20 36 0 0 1 24 0z"/>

</vector>

Playing around with the first two numbers after the "a" (i.e a20 36) will let you control the exact shape of the curve.

enter image description here