如何隐藏对话框后面的空白/黑色活动窗口 [英] How to hide blank/black activity window behind the Dialog

查看:97
本文介绍了如何隐藏对话框后面的空白/黑色活动窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这显示某些对话框和进度条一项活动。结果
这项活动并没有调用的setContentView通过这次活动没有屏幕布局。它已被刚刚用于显示对话框和进度条的对话框。

I have one Activity which displayed some Dialog boxes and Progress bars.
This activity does not have call to setContentView as this Activity does not have Screen Layout. It has been just used for displaying Dialogs and progress bar dialogs.

现在什么情况是,活动显示对话框,在该对话框的背面空白活动窗口一起,所以我想隐藏使它透明的,因此它看起来就像我们只是显示对话框。

Now what happens is that Activity Displays Dialog box along with the Blank Activity Window on back of the Dialog, So i want to hide make it transparent so it will look like we are just displaying Dialog.

感谢,
PP。

Thank, PP.

推荐答案

使用这个属性为您的活动

Use this attribute for your activity

<activity android:theme="@android:style/Theme.Translucent">

这将使活动的背景是透明的。
在你的活动标记(在清单),这是显示进度条或对话框
把这个属性上面安卓主题=@安卓风格/ Theme.Translucent
这将工作...

This will make activity background transparent. In your activity tag(in manifest) which is displaying progressbar or dialog put this above attribute android:theme="@android:style/Theme.Translucent This will work...

这篇关于如何隐藏对话框后面的空白/黑色活动窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆