显示对话框时如何消除屏幕的黑影?
当显示Dialog
时,屏幕背景会变暗。我想消除这种黑暗,使屏幕看起来像正常的。如何实现这一目标?
When a Dialog
is shown then the background of screen is darkened. I want to remove this darkness so that the screen looks like normal. How to achieve that ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
当您显示
Dialog
时,背景变成Form
,更改其样式您可以修改Dialog
的背景。我真的不知道你是否可以使这个Form
透明。我使用 LWUIT-Theme 创建器并修改Form
的样式,我可以更改图像的背景或一种颜色。在这里尝试一下!
http://lwuit.java.net/
When you show a
Dialog
the background becomes aForm
, changing its style you can modify the background of aDialog
. I don´t really know if you can make thisForm
transparent. I use the LWUIT-Theme creator and modifiying theForm
´s style, I can change the background for an image o for one colour.Try it here!
http://lwuit.java.net/
设置父窗体的色调颜色,您还可以在外观类以及资源编辑器的主题常量中进行设置。
Set the tint color of the parent form, you can also set this in the look and feel class and within the theme constants in the resource editor.
只需在对话框中添加以下代码:
dialog.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND);
just add below code on your dialog:
dialog.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND);