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:
<style name="DialogAnimation">
<item name="android:windowEnterAnimation">@anim/slide_up_dialog</item>
<item name="android:windowExitAnimation">@anim/slide_out_down</item>
</style>
Dialog imageDiaglog= new Dialog(MainActivity.this,R.style.DialogAnimation);
But I would like to do it programmatically. How can I set my programmatically created animations to Dialog's show() and hide() methods?
Thank you.