创建自定义可绘制形状

creating a custom drawable shape

我想创建如下图所示的形状矩形。 我应该做些什么? 谨致问候。

使用<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>

见下文输出: