I'm developing an Android application based on the Simon Game ( https://en.wikipedia.org/wiki/Simon_(game) ). To represent the buttons of the game (blue, red yellow and green) I drew buttons that I will use in a ImageButton.
As you can see, my buttons have a special shape, and the images have no background. I would like that the clickable area matches the shape of the button but it doesn't. It matches a square around my image.
So, my question is, do you know how can i define the clickable area so it matches only the "triangular" shape of my button ?
I already tested this :
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/btnj"
android:id="@+id/btnImgJaune"
android:background="@null"
android:clickable="false" />`
Thank you.