title: Android - AlertDialog animation no longer working
body: <p>I had it working but now it isn't. There is nothing in logcat about it.</p>
  
  <p>style.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;resources&gt;
      &lt;style name="DialogSlideAnim" parent="@android:style/Theme.Dialog"&gt;
          &lt;item name="android:windowAnimationStyle"&gt;@style/DialogAnimation&lt;/item&gt;
      &lt;/style&gt;
      &lt;style name="DialogAnimation"&gt;
          &lt;item name="android:windowEnterAnimation"&gt;@anim/push_right_in&lt;/item&gt;
          &lt;item name="android:windowExitAnimation"&gt;@anim/push_right_out&lt;/item&gt;
      &lt;/style&gt;
  &lt;/resources&gt;
  </code></pre>
  
  <p>Java</p>
  
  <pre><code>AlertDialog.Builder builder = new AlertDialog.Builder(this);
  builder.setMessage("Are you sure you want to exit??? Your progress will be saved.")
      .setCancelable(false)
      .setPositiveButton("No", new DialogInterface.OnClickListener() 
          {
              public void onClick(DialogInterface dialog, int id) 
              {
  
              }
          })
      .setNegativeButton("Yes", new DialogInterface.OnClickListener() 
          {
              public void onClick(DialogInterface dialog, int id) 
              {
                  dialog.cancel();
                  finish();
              }
          });
  AlertDialog alert = builder.create();
  alert.hide();
  alert.getWindow().getAttributes().windowAnimations = R.style.DialogSlideAnim;
  alert.show();
  </code></pre>
  
  <p>Does anyone see anything wrong with this code? Everything was working prior to me doing additional coding...and I have about 12 alertboxes on my activity.</p>