title: Dialog view animates "manually" but not when using an animation
body: <p>I am trying to apply a custom animation to show and hide a <code>Dialog</code> and have come across a certain problem.</p>
  
  <p>A <code>View</code> provides two method for animation which are <code>.animate()</code> which I call a "manual" animation and <code>.startAnimation(Animation animation)</code> which receives an <code>Animation</code> object.</p>
  
  <p>I access the dialog's view by calling <code>alertDialog.getWindow().getDecorView()</code> and try to animate it using <code>startAnimation</code> but that doesn't work. Only if I use the <code>animate</code> function I can animate it.</p>
  
  <p>Here is a code example that, as far as I know, should return the same results but reproduces the problem I'm dealing with:</p>
  
  <pre class="lang-java prettyprint-override"><code>AlertDialog dialog = AlertDialog.Builder(MainActivity.this).create(); // Create the dialog
  View decorView = dialog.getWindow().getDecorView(); // Access the dialog's view
  // The animation below works fine
  decorView.animate().rotationXBy(45).setDuration(500).start(); // Animate it "manually"
  // Create an animation instance
  RotateAnimation scaling = new RotateAnimation(0, 45);
  scaling.setDuration(500);
  scaling.setFillAfter(true);
  // This animation does NOT work
  decorView.startAnimation(scaling);
  </code></pre>
  
  <p>I have tried the same code with other views and it works normally so I guess there is some peculiarity for dialogs that break the functionality?</p>
  
  <p>I'd like to know if I'm doing something wrong and, if possible, how can I achieve what I want?</p>