I want to create 4 triangle buttons in a square view
I have tried creating view using layer-list
but it's not working. Left and right button are overriding the click event of top and bottom button
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item>
<rotate
android:fromDegrees="45"
android:toDegrees="45"
android:pivotX="-20%"
android:pivotY="5%" >
<shape
android:shape="rectangle" >
<gradient
android:angle="45"
android:startColor="#B841CC"
android:endColor="#55149f"/>
</shape>
</rotate>
</item>
</layer-list>
here is my layout design
<RelativeLayout
android:layout_width="@dimen/lwidth"
android:layout_height="@dimen/lwidth">
<Button
android:id="@+id/btngallery"
android:layout_width="match_parent"
android:layout_height="@dimen/lheight"
android:background="@drawable/pink_down"
android:textAllCaps="false"
android:text="Gallery"
android:textColor="@android:color/white"
android:paddingBottom="@dimen/lmrgnbottom"
android:textSize="@dimen/lsize"/>
<Button
android:id="@+id/btnfromphone"
android:layout_width="@dimen/lheight"
android:layout_height="match_parent"
android:background="@drawable/pink_right"
android:textAllCaps="false"
android:text="Select From Phone"
android:textColor="@android:color/white"/>
<Button
android:layout_width="@dimen/lheight"
android:layout_height="match_parent"
android:background="@drawable/pink_left"
android:layout_alignParentRight="true"/>
<Button
android:layout_width="match_parent"
android:layout_height="@dimen/lheight"
android:background="@drawable/pink_up"
android:layout_alignParentBottom="true"/>
<ImageView
android:layout_width="70dp"
android:layout_height="70dp"
android:background="@drawable/home_icon"
android:layout_centerInParent="true"/>
</RelativeLayout>