If you want to run the other end of the animation or other animation operation, then you need to AnimationListener interface onAnimationEnd method to complete. The following example is run in the shell after the end of the animation, to hide, and then play the animation and sound effects of the bomb:

animation = AnimationUtils.loadAnimation (this,
< p STYLE = "margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style- type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; color: rgb (68, 68, 68); font-family: simsun; text -align: left; background-color: rgb (243, 248, 251 );">< br /> if (animation.hashCode () == animationTop.hashCode ()){< br />

< br />

< br /> are 50%, said fulcrum in the center position.
mediaPlayer = MediaPlayer.create (this, R.raw.bomb);

android: interpolator = “@ android: anim / accelerate_interpolator”
if (animation.hashCode ()
android: interpolator = “@ anim / cycle_interpolator”
< wbr /> animationDrawable.start ();

< br />

imageView.startAnimation (animation);

< br /> < wbr /> mediaPlayer.prepare ();
android: duration = ” 2000 “
/>
animation.setRepeatCount (Animation.INFINITE); / / cycle.
R.anim.test); < wbr />

< br />

< br /> }
android: pivotX = “50%” android: pivotY = “50%”

< br /> Suppose there is a EditText component (editText), the test.xml file in the tween set on the component applied to the EditText There are two ways:
android: cycles that vibration factor. The larger the value, the more intense vibration.
android: toYDelta = “-380″
< p STYLE = "margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style- type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; color: rgb (68, 68, 68); font-family: simsun; text -align: left; background-color: rgb (243, 248, 251 );">< br /> (2) using the Animation class start method:
2, android: fromXDelta animation start position of the X coordinate.
android: toYDelta

< br />


android: interpolator =” @ android: anim / accelerate_interpolator “
android: fromXScale =” 1.0 “
< wbr /> imageView.startAnimation (animationBottom);
android: duration = “1000″ < br /> editText.startAnimation (animation);

< br / >

< br /> Loading tween
android: pivotX = “50%” android: pivotY = “50%”

< br /> animation.start ();
android: toXScale = “1.0″ android: fromYScale = “0.0″

< br /> android: duration

< br /> < wbr /> e.printStackTrace ();
/>
accelerate_interpolator animation accelerator. slowest animation in the beginning, then gradually speed up.
public
android: repeatCount = “infinite” />
(1) < br />

< br />

< br /> android: fromXDelta = “0″
animation start position of the Y coordinate.
android: interpolator = “@ android: anim / decelerate_interpolator”


android: toXDelta = “320″
/ / start animation
android: fromXScale = “0.0″

set defined in the label at the same time, the animation will begin to run…
android: pivotX scaling along the X axis, said pivot position.

< br /> animation = AnimationUtils.loadAnimation (this, R.anim.shake);
/ / bind tween
imageView.startAnimation (animationTop);

< br /> android: fromYDelta = ” 0 “android: toYDelta =” 0 “

< br />

< br /> You can configure the animation files (xml files ) or java code to move the motion tween effect. tweens files need to be on the res \ anim directory. Assuming res \ anim directory there is a movie file test.xml, the document reads as follows:
}
< wbr /> MediaPlayer
xmlns: android = “http://schemas.android.com/apk/res / android “

Third, the rotation tween

< br />
accelerate_decelerate_interpolator animation plus reducer of animation at the beginning and end of the slowest, but the first half begins to accelerate, decelerate in the second half begins.

< br /> android: toYScale = “0.2″
android: toXDelta = “0″ android: fromYDelta = “0″
< wbr /> android: interpolator = “@ android: anim / decelerate_interpolator”
use the EditText class startAnimation methods:
http://blog.sina.com.cn/feisha521

< br />

< br />

< br /> android: toAlpha = “0.1″ android: duration = “2000″ />
decelerate_interpolator animation reducer of animation at the beginning of the fastest, then slow down gradually.
android: interpolator = “@ android: anim / accelerate_interpolator”
android: cycles = “18″ />
< wbr />


animation end of the X coordinate.

< br />

< br /> ivBlast.setVisibility (View.VISIBLE);

< br /> editText.setAnimation (animation);

< wbr /> animationDrawable.stop ();
start vibrating effect of the code is as follows:
mediaPlayer.start ();
animation end of the Y coordinate.

< br />
can also be set to reverse, even several times that the animation will do with the animation file defines the direction opposite to the moving line.

< br />

< br />

< br /> android: toAlpha = “0.1″ android: duration = “2000″
android: fromXDelta = “-320″
five, along with a variety of tween application
android: pivotY said scale along the Y axis position of the fulcrum.
set the repeat mode by default restart. repeatCount value when large only at 0 or infinite effective.

android: fromDegrees = “0″


< br />

< br /> android: fromAlpha = “1.0″
tween load files need to use AnimationUtils.loadAnimation method.

< br />

< br /> android: fromAlpha = “1.0″

android: pivotX =” 50% “android: pivotY =” 50% “
/ / start playing the sound of explosion
android: repeatMode
android: duration = “2000″ />
Animation

< br /> six, vibration effects

< br /> ivMissile.setVisibility (View.INVISIBLE);
android: toXScale = “0.2″ android: fromYScale = “1.0″
1,