title: AlertDialog theme not working
body: <p>my source </p>
  
  <pre><code>private static final int ALERT_DIALOG = 1;
  
      @Override
      public void onBackPressed() {
          // buildAlertMessageExit();
  
          showDialog(ALERT_DIALOG);
      }
  
      @Override
      protected Dialog onCreateDialog(int id) {
          Dialog dialog = null;
          if (id == ALERT_DIALOG) {
              ContextThemeWrapper ctw = new ContextThemeWrapper(this,
                      R.style.AlertDialogCustom);
              AlertDialog.Builder builder = new AlertDialog.Builder(ctw);
              builder.setMessage("Hello World")
                      .setTitle("Alert Dialog")
                      .setIcon(android.R.drawable.ic_dialog_alert)
                      .setCancelable(false)
                      .setPositiveButton("Close",
                              new DialogInterface.OnClickListener() {
                                  public void onClick(DialogInterface dialog,
                                          int which) {
                                      dialog.dismiss();
                                  }
                              });
              dialog = builder.create();
          }
          if (dialog == null) {
              dialog = super.onCreateDialog(id);
          }
          return dialog;
      }
  </code></pre>
  
  <p>styles.xml</p>
  
  <pre><code> &lt;style name="AlertDialogCustom" parent="@android:style/Theme.Dialog"&gt;
       &lt;item name="android:windowBackground"&gt;@null&lt;/item&gt; 
      &lt;item name="android:windowFrame"&gt;@null&lt;/item&gt;
     &lt;/style&gt;
  </code></pre>
  
  <p><strong>and as a result there is no theme</strong></p>
  
  <p><img src="https://i.stack.imgur.com/vsXzL.png" alt="enter image description here"></p>