Add slide-in animation when the Transactions items are loaded into the screen.
This commit is contained in:
parent
dc7decfb77
commit
89cf6f3df2
3 changed files with 23 additions and 1 deletions
15
app/src/main/res/anim/item_animation_from_bottom.xml
Normal file
15
app/src/main/res/anim/item_animation_from_bottom.xml
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:duration="700">
|
||||||
|
|
||||||
|
<translate
|
||||||
|
android:interpolator="@android:anim/accelerate_decelerate_interpolator"
|
||||||
|
android:fromYDelta="50%p"
|
||||||
|
android:toYDelta="0"/>
|
||||||
|
|
||||||
|
<alpha
|
||||||
|
android:fromAlpha="0"
|
||||||
|
android:toAlpha="1"
|
||||||
|
android:interpolator="@android:anim/accelerate_decelerate_interpolator"/>
|
||||||
|
|
||||||
|
</set>
|
6
app/src/main/res/anim/layout_animation_from_bottom.xml
Normal file
6
app/src/main/res/anim/layout_animation_from_bottom.xml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layoutAnimation
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:animation="@anim/item_animation_from_bottom"
|
||||||
|
android:delay="15%"
|
||||||
|
android:animationOrder="normal"/>
|
|
@ -12,6 +12,7 @@
|
||||||
android:padding="@dimen/card_margin"
|
android:padding="@dimen/card_margin"
|
||||||
android:clipToPadding="false"
|
android:clipToPadding="false"
|
||||||
tools:listitem="@layout/item_transaction"
|
tools:listitem="@layout/item_transaction"
|
||||||
tools:itemCount="6"/>
|
tools:itemCount="6"
|
||||||
|
android:layoutAnimation="@anim/layout_animation_from_bottom"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
Loading…
Reference in a new issue