Code

Code

Making a triangle shape using xml in Android

Down
<vector android:height="24dp" android:viewportheight="24.0" android:viewportwidth="24.0" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
    <path android:fillcolor="#000000" android:pathdata="M5.7,11.5c3.2,6.3 6,11.5 6.3,11.5 0.3,0 3.1,-5.2 6.3,-11.5l5.7,-11.5 -12,0 -12,0 5.7,11.5z" android:strokecolor="#00000000">
</path></vector>
Left
<vector android:height="24dp" android:viewportheight="24.0" android:viewportwidth="24.0" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
    <path android:fillcolor="#000000" android:pathdata="M12.3,5.8c-6.2,3.1 -11.3,5.9 -11.3,6.2 0,0.3 5.2,3.1 11.5,6.3l11.5,5.7 0,-12c0,-6.6 -0.1,-12 -0.2,-11.9 -0.2,0 -5.4,2.6 -11.5,5.7z" android:strokecolor="#00000000">
</path></vector>
Right
<vector android:height="24dp" android:viewportheight="24.0" android:viewportwidth="24.0" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
    <path android:fillcolor="#000000" android:pathdata="M0,12l0,12 11.5,-5.7c6.3,-3.2 11.5,-6 11.5,-6.3 0,-0.3 -5.2,-3.1 -11.5,-6.3l-11.5,-5.7 0,12z" android:strokecolor="#00000000">
</path></vector>
Top
<vector android:height="24dp" android:viewportheight="24.0" android:viewportwidth="24.0" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
    <path android:fillcolor="#000000" android:pathdata="M5.7,12.5l-5.7,11.5 12,0 12,0 -5.7,-11.5c-3.2,-6.3 -6,-11.5 -6.3,-11.5 -0.3,0 -3.1,5.2 -6.3,11.5z" android:strokecolor="#00000000">
</path></vector>