How to draw right Triangles shape in android xml

Viewed 4417

enter image description here

How to create shape in android using xml?

3 Answers

Try this one

Also check my another answer How to create vector drawable in android studio

enter image description here

<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="108dp"
    android:height="113dp"
    android:viewportWidth="108"
    android:viewportHeight="113">
  <path
      android:pathData="M2.423,111.534L105.599,110.724L1.032,3.022L2.423,111.534Z"
      android:strokeWidth="2"
      android:fillColor="#ffffff"
      android:strokeColor="#000000"/>
</vector>

enter image description here

 <vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="119dp"
    android:height="126dp"
    android:viewportWidth="119"
    android:viewportHeight="126">
  <path
      android:strokeWidth="1"
      android:pathData="M117.632,124.928L1.686,125.144L118.003,2.092L117.632,124.928Z"
      android:fillColor="#ffffff"
      android:strokeColor="#000000"/>
</vector>
Related