title: How to make ProgressDialog Transparent in android
body: <p>I want to make ProgressDialog Transparent but I never became Transparent It became Black background in ProgressDialog.How can I do that Kindly help</p>
  
  <p>here is my code for ProgressDialog:-</p>
  
  <pre><code>private class LoginAttempt extends AsyncTask&lt;String, Void, String&gt; {
      @Override
      protected void onPreExecute() {
          super.onPreExecute();
          pDialog = new ProgressDialog(getActivity(), R.style.MyTheme);
          pDialog.setCancelable(false);
          pDialog.setProgressStyle(android.R.style.Widget_ProgressBar_Small);
          pDialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
          pDialog.show();
  
      }
  </code></pre>
  
  <p>here is my style.xml</p>
  
  <pre><code> &lt;style name="MyTheme" parent="android:Theme.Holo.Dialog"&gt;
      &lt;item name="android:alertDialogStyle"&gt;@style/CustomAlertDialogStyle&lt;/item&gt;
      &lt;item name="android:windowBackground"&gt;@color/transparent&lt;/item&gt;
      &lt;item name="android:textColorPrimary"&gt;#FFFFFF&lt;/item&gt;
      &lt;item name="android:backgroundDimEnabled"&gt;false&lt;/item&gt;
      &lt;item name="android:textColor"&gt;#FFFFFF&lt;/item&gt;
      &lt;item name="android:textStyle"&gt;normal&lt;/item&gt;
      &lt;item name="android:textSize"&gt;12sp&lt;/item&gt;
  &lt;/style&gt;
  </code></pre>
  
  <p>and also</p>
  
  <pre><code>&lt;style name="CustomAlertDialogStyle"&gt;
      &lt;item name="android:bottomBright"&gt;@color/transparent&lt;/item&gt;
      &lt;item name="android:bottomDark"&gt;@color/transparent&lt;/item&gt;
      &lt;item name="android:bottomMedium"&gt;@color/transparent&lt;/item&gt;
      &lt;item name="android:centerBright"&gt;@color/transparent&lt;/item&gt;
      &lt;item name="android:centerDark"&gt;@color/transparent&lt;/item&gt;
      &lt;item name="android:centerMedium"&gt;@color/transparent&lt;/item&gt;
      &lt;item name="android:fullBright"&gt;@color/transparent&lt;/item&gt;
      &lt;item name="android:fullDark"&gt;@color/transparent&lt;/item&gt;
      &lt;item name="android:topBright"&gt;@color/transparent&lt;/item&gt;
      &lt;item name="android:topDark"&gt;@color/transparent&lt;/item&gt;
  &lt;/style&gt;
  </code></pre>
  
  <p>and here is my result:-
  <a href="http://i.stack.imgur.com/uvVP5.png" rel="nofollow">enter image description here</a></p>