Android diagonal triangle buttons

2019-03-31 01:58发布

I am working on an android application.

I need to have 2 buttons but similar to the following picture.

enter image description here

The red triangle is a button and the yellow is another button.

How can this be achieved?

Is there a way to do it other than having it as 1 picture and then checking the touch position? because that would involve a lot of math and might not be precise. Also if I use this method I cannot have a clicked state on the each button seperatly. (like when the button grays out on touch down)

Thanks for any tips.

0条回答
登录 后发表回答