I want to draw an equilateral triangle.I have checked but it is inverted.I want a triangle that looks like the image below.
triangle_shape.xml:
<?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="45"
android:pivotX="-40%"
android:pivotY="87%" >
<shape
android:shape="rectangle" >
<stroke android:color="#fff" android:width="1dp"/>
<solid
android:color="#000" />
</shape>
</rotate>
</item>
</layer-list>
Currently it looks like this..
Try this way it will work
OUTPUT
I have found out the way to make it look like an up facing triangle.
Usign Vector drawable you can achieved your shape like below:
Output:
I hope its helps you.