Categories of animations:
(1) frameanimation frame animation (drawable Animation)
Implementation steps:
A. Prepare several pictures
B. Create a new Android XML file, where resource Type: drawable, Root Element: animation-list
C. Edit animation profile, set picture order and toggle Interval
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/6D/17/wKiom1Vb_IzB4rgBAANOLGthVeE856.jpg "title=" Clipboard.png "width=" "height=" 278 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:600px;height:278px; "alt=" Wkiom1vb_izb4rgbaanolgthvee856.jpg "/>
D. Getting animated objects
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/6D/17/wKiom1Vb_SXyE2snAAFl3l_tBXg222.jpg "title=" Clipboard.png "alt=" Wkiom1vb_sxye2snaafl3l_tbxg222.jpg "/>
E. Playing animations
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/6D/12/wKioL1Vb_sOS_DkBAABDIj2ChPM694.jpg "title=" Clipboard.png "alt=" Wkiol1vb_sos_dkbaabdij2chpm694.jpg "/>
A problem exists:
A. More or larger pictures may cause outofmemoryerror
B. On some devices (card/slow) may appear the animation does not display the problem
Cause: The animation's playback and life cycle methods (OnStart ()/onresume ()) Order cannot be guaranteed
Workaround: Play the animation over time, so that the animation plays after Onresume ()
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/6D/12/wKioL1VcABijpiGQAAD6uHeh4Hc220.jpg "title=" Clipboard.png "width=" "height=" 161 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:600px;height:161px; "alt=" Wkiol1vcabijpigqaad6uheh4hc220.jpg "/>
(2) tweenanimation (View Animation) motion Tween
Principle: The system by changing the properties of the graphic, to supplement the transition process of the picture, produce animation effect
Properties: Size/position/angle/transparency
Cons: Just the effect transform on the view, the control itself does not change
Implementation method:
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/6D/17/wKiom1Vb_1HhqTT7AAEjQdipRjU843.jpg "title=" Clipboard.png "width=" "height=" "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:600px;height:88px; "alt=" Wkiom1vb_1hhqtt7aaejqdiprju843.jpg "/>
Or