I created a custom button as shown in the image. My problem is that the bounds still clickble. Is there any way to wrap the triangle.
Image custom button
My shape xml file :
<?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="-10%"
android:pivotY="87%" >
<shape
android:shape="rectangle" >
<stroke android:color="@color/transparent" android:width="30dp"/>
<solid
android:color="@android:color/black" />
</shape>
</rotate>
</item>
</layer-list>
Button:
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="100dp"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:weightSum="1">
<Button
android:layout_width="114dp"
android:layout_height="match_parent"
android:background="@drawable/triangle"
android:id="@+id/button"/>
</LinearLayout>
I also tried canvas approach and get the same problem.