0

I am trying to create a Triangle on top of a Rectangular View in Android. I am using this drawable xml to create a Triangle View. But I am not able to get the rounded edge. How to achieve this. Can someone help ?

Xml code :

<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item>
    <rotate
        android:fromDegrees="45"
        android:toDegrees="-135"
        android:pivotX="90%"
        android:pivotY="-45%">
        <shape
            android:shape="rectangle">

            <solid
                android:color="@android:color/black"/>
        </shape>

    </rotate>
</item>

What I am trying to achieve :

enter image description here

What I am getting in Device :

enter image description here

Sasank Sunkavalli
  • 3,864
  • 5
  • 31
  • 55

0 Answers0