Skip to content

Instantly share code, notes, and snippets.

@patrick-elmquist
Last active August 14, 2021 09:37
Show Gist options
  • Save patrick-elmquist/f489e874b05cc124b2b07228eef68dc2 to your computer and use it in GitHub Desktop.
Save patrick-elmquist/f489e874b05cc124b2b07228eef68dc2 to your computer and use it in GitHub Desktop.
Enter animation demo: Slide from bottom demo
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="@integer/anim_duration_long">
<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>
<?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"
/>
@1reverseengineer
Copy link

1reverseengineer commented Jul 28, 2021

The file "layout_animation_from_bottom.xml" has a syntax error in it -> version and encoding are not strings. This is how it's supposed to look like:

<?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"
/>

Even though you posted a comment with the updated version, your proandroiddev article doesn't reflect that crucial change, this is what the article displays:

<?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"
/>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment