-3

I want to make thi kind of Shape in XML, 3 edges straight and 1 edge is round.

I want the Blue Shape in the following image.

enter image description here

i tried this to no avail

<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" android:padding="10dp">
<solid android:color="#FFFFFF"/>
<corners 
android:bottomRightRadius="0dp"
android:bottomLeftRadius="0dp"
android:topLeftRadius="15dp"
android:topRightRadius="15dp"/>
</shape>
Phantômaxx
  • 37,901
  • 21
  • 84
  • 115

2 Answers2

1

Here is what you're looking for. So you can simply do this:

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

<path
    android:fillColor="@android:color/holo_red_light"
    android:pathData="M 2,9 C 2,9.5 4,10 6,10 C 8,10 10,9.5 10,9 L 10,0 2,0 2,8"
    android:strokeWidth="0.1"/>

StackUseR
  • 884
  • 1
  • 11
  • 40
-1

Try it!!

<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid android:color="#FFFFFF" />
<stroke
    android:width="1dp"
    android:color="#0bd9ff" />
<corners android:radius="10dip" />
<padding
    android:bottom="0dip"
    android:left="0dip"
    android:right="0dip"
    android:top="0dip" />
<size
    android:width="50dp"
    android:height="50dp" />
</shape>
Nguyễn Trung Hiếu
  • 2,004
  • 1
  • 10
  • 22