title: Create a DialogFragment with a transparent background
body: <p>I have searched for an answer to this question but none of the answers helped me.</p>
  
  <p>The problem is that I have a DialogFragment that is displayed when a user add a widget (as part of the WidgetConfig). It looks like this:</p>
  
  <p><img src="https://i.stack.imgur.com/nEu3p.jpg" alt="enter image description here"></p>
  
  <p>The dialog is created like this;</p>
  
  <p>Calling activity:</p>
  
  <pre><code>public class AppWidgetConfigure extends Activity {
  
      private void setUp(){
  
          //Config widget code removed 
  
          DialogFragment dialog = new ChooserDialog();
          dialog.show(getFragmentManager(), "dialog");
      }
  }
  </code></pre>
  
  <p>the DialogFragment:</p>
  
  <pre><code>public class ChooserDialog extends DialogFragment {
  
      @Override
      public Dialog onCreateDialog(Bundle savedInstanceState) {
  
          choices = getResources().getStringArray(R.array.choices);
          AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());       
          builder.setTitle(getResources().getString(R.string.widget_dialog_chooser_title));
          builder.setPositiveButton(getResources().getString(R.string.widget_dialog_chooser_posBtn), this);
          builder.setNegativeButton(getResources().getString(R.string.widget_dialog_chooser_negBtn), this);   
          builder.setSingleChoiceItems(choices, -1, this);
          return builder.create();
  
      }
  }
  </code></pre>
  
  <p>I want the dialog to have a <strong>transparent background</strong>. Currently, as shown in the picture, there is the WidgetConfigure activity as background. </p>
  
  <p>Thankful for any help.</p>
  
  <p>Marcus</p>