开发者

circle PNG image making it interactive on android

Well i have a circle image that i am using imageview to show开发者_如何学运维 in the app

I need someway to make parts of this image interactive like event should fire depend on which part of the image the user is clicking , i.e. if user is clicking on the center of the image or on one of the pie slices of the circle image

how this could be achived ?!


One way would be slicing the image into the parts, then assigning a clickevent to each part with the appropriate reaction.

the other way could be to check on the clickevent where you have clicked (x,y) and check if it is in a range you defined as an area if it's in there.

or you have different colors of the slices, you then get the color of the clicked pixel and evaluate where it belongs to

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜