layoutanimation (Layout animation) Add animations for view groups using Layoutanimationcontroller, animate a ListView, A new method is used: Setlayoutanimation (). Setorder (LAYOUTANIMATIONCONTROLLER.XXXX) is the order in which animations are set, such as order. The random represents an arbitrary order. The ListView is the equivalent of a view Groups, which is a group of (collection) views that hold a lot of view. Then we use the layout animation to the inside of each view in turn according to the effect of the layout animation to play.
Frames-per- frame animation: Define a animation-list XML in the drawable directory, include the picture resource in the item tag, and play each picture to form a frame-by-box animation effect XML implementation: <animation-list .... > <item android:drawable= "@drawable/one"//Specify the resource to play on the first frame android:duration= the time/>//play <item android:drawable= "@drawable/two"//Specifies the second frame to play the resource android:duration= "" "/>//playback time <item android: drawable= "@drawable/three"//Specify the resources played on the third frame android:duration= the time of the/>//play </animation-list> Make Imageview.setimageresource (r.drawable.**) in the code based on other notes from other students who watch the video; Animationdrawable animationdrawable = (animationdrawable) imageview.getdrawable (); Animationdrawable.start (); You can play the animation.
Android Siege Lion layout animation