2012-06-06 71 views
0

我有一个大图像背景的ImageButton。我希望能够在该按钮中设置映射区域,因此我可以控制将调用该按钮的onClick方法的区域。Android - 如何选择按钮的可点击区域?

换句话说,我需要的是类似于HTML的“映射”标签(http://www.w3schools.com/tags/tag_map.asp)的东西:

<img src="planets.gif" width="145" height="126" alt="Planets" usemap="#planetmap" /> 
<map name="planetmap"> 
<area shape="rect" coords="0,0,82,126" href="sun.htm" alt="Sun" /> 
<area shape="circle" coords="90,58,3" href="mercur.htm" alt="Mercury" /> 
<area shape="circle" coords="124,58,8" href="venus.htm" alt="Venus" /> 
</map> 

有什么在Android上做到这一点的方法?

预先感谢您!

回答