Android:在按钮上绘制图像
是否可以在另一个视图(如按钮)上绘制图像并且仍然使视图正常工作?即使按钮上方有另一个图像,用户仍然可以单击该按钮。我想在我的布局上绘制一些大部分透明的 png 以实现照明效果,但我想确保一切仍然正常工作。
Is it possible to draw an image over another view (like a button) and still have the view work normally? The user would still be able to click on the button even though there is another image on top of it. I want to draw some mostly transparent pngs over my layout for lighting effects, but I want to make sure everything will still work correctly.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
更多
发布评论
评论(1)
尝试在应用中的小部件顶部使用
RelativeLayout
和ImageView
。有关简单示例,请参阅此问题。Try using a
RelativeLayout
with anImageView
on top of the widget(s) in your app. See this question for a quick example.