Android Siege Lion layout animation

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.