Fly In Animation for GridView

I have a gridview, and I'm trying to achieve a fly in relation to the images inside it. It will be very similar to the effect observed when loading the 3D gallery, and your folders with images "go". I searched this topic and think I need to use ViewAnimator and generate animation through this: http://developer.android.com/reference/android/widget/ViewAnimator.html#setInAnimation(android.view.animation.Animation )

However, I am not sure, and any help on how to achieve this will be very welcome!

Hi

Mark

+3
source share
1 answer

Do you want a fly-in animation for each grid or for the entire presentation?

For the whole view, use the following:

        Animation anim = AnimationUtils.loadAnimation(getApplicationContext(), R.anim.flyin);
        findViewById(R.id.YourViewId).setAnimation(anim);
        anim.start();

flyin.xml :

<set xmlns:android="http://schemas.android.com/apk/res/android" android:shareInterpolator="true">
    <scale android:interpolator="@android:anim/decelerate_interpolator"
           android:fromXScale="1.0" android:toXScale="0.0" 
           android:fromYScale="1.0" android:toYScale="0.0"
           android:pivotX="50%" android:pivotY="50%"
           android:fillAfter="false" android:duration="250"/>
</set>

res/anim.

+10

Source: https://habr.com/ru/post/1791961/


All Articles