对话框是否被视为视图?

发布于 2024-11-05 20:26:59 字数 64 浏览 7 评论 0原文

Android 中的对话框是否被视为视图?我想向 FrameLayout 添加一个,但我不确定是否可以?是否可以?

Is a DialogBox considered a View in Android? I want to add one to a FrameLayout, but I'm not sure if I can? Is it possible?

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

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

发布评论

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

评论(2

葬花如无物 2024-11-12 20:26:59

除非我遗漏了什么,否则 Dialog 直接从 Object 继承,并且不适用于 View。但我不得不问,为什么要将 Dialog 添加到 FrameLayout 中?

Unless there's something I'm missing, no, Dialog inherits directly from Object, and does not apply as a View. But I have to ask, why do you want to add Dialog into a FrameLayout in the first place?

尹雨沫 2024-11-12 20:26:59

您可能需要为此问题创建一个自定义对话框,这是官方 Android 开发人员网站

http://developer.android.com/guide/topics/ui/dialogs.html#CustomDialog

You probably need to make a custom dialog for this matter a good help for that is the official android developer website

http://developer.android.com/guide/topics/ui/dialogs.html#CustomDialog

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