隐形/透明按钮的工作方式与 Android 中的常规按钮类似吗?
如何使图像中间的一个区域可点击(而不是整个图像)?尝试将按钮设置为不可见且可单击,但该按钮不起作用。与常规按钮一样工作的隐形/透明按钮有哪些替代方案?
我还想到了一个完全透明且可点击的PNG,应该可以工作,但也许不是最好的方法?
How do I get one area in the middle of a image clickable (not the whole image)? Tried with a button set to invisible and clickable but the button does not work. What are the alternatives to an invisible / transparent button that works like a regular?
I've also thought of a completely transparent and clickable PNG that should work but maybe not the best way?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
干得好:
Here you go:
您可以尝试为按钮设置透明背景。但不要更改按钮的可见性,因为这会阻止视图获取单击事件。
You can try set transparent background to the button. But do not change buttons visibility, cause that prevents view from getting click events.
您还可以使用
You can also use
有:
There's: