如何在 Android 上创建带有帮助气泡的叠加层?

发布于 2024-12-04 06:34:22 字数 249 浏览 3 评论 0原文

我记得看到一些 Android 应用程序有一个帮助覆盖层,它使屏幕稍微变灰,并提供带有指向各种 UI 对象的有用信息的文本气泡。

我认为这很简单,只需创建一个包含 2 层、1 个内容、1 个帮助覆盖的 FrameLayout 即可。 但是,您似乎无法将 RelativeLayout 与基于另一个 RelativeLayout 的项目一起使用?

我该如何定位这些气泡?手动?

I recall seeing some android apps having a help overlay that greys the screen a bit and provides textbubbles with helpfull information pointing to various UI objects.

I thought this to be easy, just create a FrameLayoutwith 2 layers, 1 content, 1 helpoverlay.
However, it appears that you can't use a RelativeLayout with items that are based upon another RelativeLayout?

How would I go to position these bubbles? Manually?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

恏ㄋ傷疤忘ㄋ疼 2024-12-11 06:34:22

使用 PopupWindow。可以在此处找到示例实现: http://sree.cc/google/android/android -popup-window

您可以使用 popupWindow.showAsDropdown(View anchor) 方法将弹出窗口附加到任何视图或手动设置要显示的弹出窗口的 x 和 y 坐标。

[编辑]:
您可能还想看看这里:http://code.google.com/p/简单快速操作/

Use a PopupWindow. a sample implementation can be found here : http://sree.cc/google/android/android-popup-window

You can use the popupWindow.showAsDropdown(View anchor) method to attach the popup to any view or manually set the x and y co-ordinates of the popup to be shown.

[EDIT]:
you may also want to have a look here : http://code.google.com/p/simple-quickactions/

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