<?xml version="1.0" encoding="utf-8"?>
<translate xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="500"
android:fromYDelta="100%p"
android:toYDelta="0%p" />
<?xml version="1.0" encoding="utf-8"?>
<translate xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="500"
android:fromYDelta="0%p"
android:toYDelta="100%p" />
<style name="DialogAnimation">
<item name="android:windowEnterAnimation">@anim/slide_in</item>
<item name="android:windowExitAnimation">@anim/slide_out</item>
</style>
<style name="AnimatedDialogTheme" parent="@android:style/Theme.Panel">
<item name="android:windowAnimationStyle">@style/DialogAnimation</item>
</style>
//Use try catch to avoid Exception in lower api devices
try {
dialog = new Dialog(this, R.style.AnimatedDialogTheme);
} catch(Exception ex) {
dialog = new Dialog(this);
}
0 comments :
Post a Comment