Android中的透明对话框背景

时间:2015-05-27 12:30:04

标签: android progressdialog

修改

在此处找到答案

Why the background of ProgressDialog doesn't set to the transparent?

我知道这个问题有很多重复,但我似乎无法找到解决方案。

我想让我的对话背景透明,但似乎没有工作。

这是我在xml中的代码。

function translate(event)
{
  if ( event.which == 13 || event.keyCode == 13) 
  {
    submitForm('', 'mainForm');
  }
}

这是输出。

问题1:它显示灰色背景和周围的阴影。 我只想显示动画对话框。

我尝试使用透明背景图片,但仍然显示相同的灰色背景。

我也尝试过使用

<style name="TransparentProgressDialog" >
       <item name="android:windowFrame">@null</item>
    <item name="android:windowBackground">@android:color/transparent</item>
    <item name="android:windowIsFloating">true</item>
    <item name="android:windowContentOverlay">@null</item>
    <item name="android:windowTitleStyle">@null</item>
    <item name="android:windowAnimationStyle">@android:style/Animation.Dialog</item>
    <item name="android:windowSoftInputMode">stateUnspecified|adjustPan</item>
    <item name="android:backgroundDimEnabled">false</item>
    <item name="android:background">@android:color/transparent</item>
    </style>

在我的Java代码中但仍然无效。

Dialog Image

0 个答案:

没有答案
相关问题