对话框是否被视为视图?
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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
除非我遗漏了什么,否则 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?
您可能需要为此问题创建一个自定义对话框,这是官方 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