//Animation CollectionAnimationset Animationset =NewAnimationset (true); //Alpha AnimationAnimation Animation =NewAlphaanimation (0.0f,1.0f); Animation.setduration (1300); Animationset.addanimation (animation); //The displacement animation effect falls from the Y direction to its own position//relative_to_self relative to itself//-1.0f The starting y-coordinate to its own height//translateanimation (int fromxtype, float fromxvalue,//int Toxtype, float toxvalue,//int Fromytype, float fromyvalue,//int Toytype, float toyvalue)Animation =Newtranslateanimation (animation.relative_to_self,0.0f,animation.relative_to_self,0.0f, Animation.relative_to_self,-1.0f,animation.relative_to_self,0.0f); Animation.setduration (1300); Animationset.addanimation (animation); //set the Child view animation and durationLayoutanimationcontroller Controller =NewLayoutanimationcontroller (animationset,0.5f); //bind to ListViewMlistview.setlayoutanimation (Controller);
Animate the ListView Item