title: Animate custom Dialog programmatically
body: <p>I would like to set some animations to my custom dialog and I would like to do it programmatically. I know I can do it like this with xml animations:</p>
  
  <pre><code>&lt;style name="DialogAnimation"&gt;
      &lt;item name="android:windowEnterAnimation"&gt;@anim/slide_up_dialog&lt;/item&gt;
      &lt;item name="android:windowExitAnimation"&gt;@anim/slide_out_down&lt;/item&gt;
  &lt;/style&gt;
  
  
  Dialog imageDiaglog= new Dialog(MainActivity.this,R.style.DialogAnimation);
  </code></pre>
  
  <p>But I would like to do it programmatically. How can I set my programmatically created animations to Dialog's show() and hide() methods?</p>
  
  <p>Thank you.</p>