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上做到這一點的方法?
預先感謝您!
這是一個非常有趣的解決方案。它符合我的需求。謝謝伊姆蘭! – Tiago