在一个圆圈按钮 [英] Buttons in a circle

查看:180
本文介绍了在一个圆圈按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于上述圈子,我可以在同一圆周为每一个星座创建单独的按钮

For the above circle can I create individual buttons on the same circle for each and every zodiac sign

推荐答案

这形象可能是太复杂的复制与多个视图。你能做的最好的事情可能是只延长查看的ImageView ,然后重写 onTouch 方法。

That image is probably way too complex to replicate with multiple views. The best thing you could do would probably be to just extend a View or ImageView, and then override the onTouch method.

在onTouch你可以触摸的准确XY坐标,它与所有的个人可点击区域的已知界限进行比较。根据哪个区你点击你可以采取不同的操作。

In onTouch you can get the exact XY coordinates of the touch, and compare it with the known boundaries of all the individual clickable areas. Based on what area you click you can take a different action.

这篇关于在一个圆圈按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆