.:: CODE SNIPPET ::.

"Your time is limited, so don't waste it living someone else's life"

Tag Archives: dialog

Cách tạo hiệu ứng di chuyển cho Dialog trong android


Để tạo hiệu ứng cho dialog, chúng ta lần lượt tạo ra các file hiệu ứng sau:
+File grow_from_bottom.xml

<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
        <scale
                android:fromXScale="0.3" android:toXScale="1.0"
                android:fromYScale="0.3" android:toYScale="1.0"
                android:pivotX="50%" android:pivotY="100%"
                android:duration="@android:integer/config_shortAnimTime"
        />
        <alpha
                android:interpolator="@android:anim/decelerate_interpolator"
                android:fromAlpha="0.0" android:toAlpha="1.0"
                android:duration="@android:integer/config_shortAnimTime"
        />
</set>

+File grow_from_top.xml Read more of this post

Advertisements
%d bloggers like this: