Fly In Animation for a GridView

前端 未结 1 1551
慢半拍i
慢半拍i 2021-02-03 16:21

I have a gridview, and I am trying to achieve a fly in effect on the images within it. This would be very similar to the effect seen when you load up gallery 3D and your image f

1条回答
  •  不要未来只要你来
    2021-02-03 16:38

    Do you want the fly-in animation per grid, or for the entire view?

    For the entire view, use this:

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

    Then specify your animation in a file flyin.xml like this:

    
        
    
    

    Put that file in your res/anim-directory.

    0 讨论(0)
提交回复
热议问题