I have created/tried to create, a round button for android by using the ImageButton “widget”.
But since that type of button is treated as a square and my png-image also is treated as a square with a transparent background, then how do I avoid the user from beeing able to press outside the round button?.. cause as for now.. they can press in the “corners” of the button and that will still trigger the click-event..
Is there any speciall mapping-layer that can be done in photoshop or any way to change the radius of the image button so it fits to the “roundness” of my image.. or any ideas?
Thanks in advance!.. and sorry for poor english..
Try Pythagorean theorem and onTouch, simple and easy way to do it.
the x, y is the posision of the circle, the radius is the radius, and the e is the TouchEvent you have.