Search code examples
androidandroid-shapeandroid-shapedrawable

creating a custom drawable shape


I want to create the shape rectangle as shown below the Image. what am I supposed to do? with best regards.

enter image description here


Solution

  • Using <vector>

        <vector xmlns:android="http://schemas.android.com/apk/res/android"
        android:width="24dp"
        android:height="8dp"
        android:viewportWidth="24.0"
        android:viewportHeight="50.0">
    
        <path
            android:fillColor="#8CCC13"
            android:pathData="M24 24v-24h-24v24a20 36 0 0 1 24 0z" />
    
    </vector>
    

    see below Output :

    enter image description here