I am trying to slide in a custom dialog just after the activity is created. but each time dialog comes along with the activity. I want to show the dialog after the activity is created.
Have tried creating the dialog in onCreate()
, onResume
, onPostResume
.
Dialog creation :
Dialog dialog = new Dialog(this, R.style.PauseDialog);
dialog.setTitle("Test Dialog Transition");
dialog.show();
animation style :
<style name="PauseDialog" parent="@android:style/Theme.Dialog">
<item name="android:windowAnimationStyle">@style/PauseDialogAnimation</item>
</style>
<style name="PauseDialogAnimation">
<item name="android:windowEnterAnimation">@android:anim/slide_in_left</item>
<item name="android:windowExitAnimation">@android:anim/slide_out_right</item>
</style>