Triangular button for android activity

In my work with Android applications, I need to set 6 buttons, as shown below: The buttons are called from 1 to 6. When I try to add each button as a background for the buttons, there is a problem that the buttons overlap with each other. Background png image of a button of a triangular shape. When I add these background pngs to the buttons, its background image changes, but the borders of the button still have a rectangle. Therefore, I need buttons with triangular borders, so I can place them in a format similar to the screenshot below. In addition, I do not use this layout for this type. So please suggest that also ..

enter image description here

+4
2

: .

triangle.xml

<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
   <item>
      <rotate
        android:fromDegrees="45"
        android:toDegrees="45"
        android:pivotX="-40%"
        android:pivotY="100%"
        >
           <shape android:shape="rectangle">

              <corners android:radius="15dip" />
              <solid android:color="@color/blue" />
           </shape>
      </rotate>
   </item>
</layer-list>

//TEXTVIEW CALLING

<TextView
  android:layout_width="@dimen/triangle"
  android:layout_height="@dimen/triangle"
  android:rotation="90"
  android:layout_centerVertical="true"
  android:background="@drawable/triangle"/>
+4
0

All Articles