I would like to install some animations in my user dialog, and I would like to do this programmatically. I know I can do this with xml animation:
<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 to configure my programmatically created animations on the Dialog show () and hide () methods?
Thanks.
source share