Android:在按钮上绘制图像

发布于 2025-01-05 06:21:41 字数 109 浏览 3 评论 0原文

是否可以在另一个视图(如按钮)上绘制图像并且仍然使视图正常工作?即使按钮上方有另一个图像,用户仍然可以单击该按钮。我想在我的布局上绘制一些大部分透明的 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

听不够的曲调 2025-01-12 06:21:41

尝试在应用中的小部件顶部使用 RelativeLayoutImageView 。有关简单示例,请参阅此问题

Try using a RelativeLayout with an ImageView on top of the widget(s) in your app. See this question for a quick example.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文