Warum ist der Hintergrund von ProgressDialog nicht transparent?

Ich möchte den Hintergrund transparent machen, also habe ich den folgenden Code eingegeben

styles.xml
<style name="dialog" parent="@android:style/Theme.Dialog">  
            <item name="android:windowFrame">@null</item>  
            <item name="android:windowIsFloating">true</item>  
            <item name="android:windowContentOverlay">@null</item>  
            <item name="android:windowAnimationStyle">@android:style/Animation.Dialog</item>  
            <item name="android:windowSoftInputMode">stateUnspecified|adjustPan</item>  
            <item name="android:windowBackground">@android:color/transparent</item>  
            <item name="android:windowNoTitle">true</item> 
        </style> 

Und ich habe das benutztProgressdialog wie der folgende Code inJAVA file und infragment.

Activity activity = getActivity() ;
mProgressDialog = new ProgressDialog(activity,R.style.dialog) ;
mProgressDialog.setCancelable(false) ;
mProgressDialog.show() ;

Aber ich bekomme den Fortschritt wie auf dem folgenden Bild und es hat keinen transparenten Hintergrund.

Warum ändert sich der Hintergrund nicht zum transparenten?

Antworten auf die Frage(4)

Ihre Antwort auf die Frage