android Tween (Tween) animation
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 />
mediaPlayer = MediaPlayer.create (this, R.raw.bomb);
scale>
android: interpolator = “@ android: anim / accelerate_interpolator”
set>
< br />
< br />
/>
R.anim.test); < wbr />
< br />
< br />
android: pivotX = “50%” android: pivotY = “50%”
< br />
android: cycles that vibration factor. The larger the value, the more intense vibration.
< 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, android: fromXDelta animation start position of the X coordinate.
< br />
< br / >
< br /> < br /> < br /> < br /> < br />
< br /> < br /> animation = AnimationUtils.loadAnimation (this, R.anim.shake); < br /> android: fromYDelta = ” 0 “android: toYDelta =” 0 “ < br />
< br /> < br /> < br /> < br />
< br />
< br /> android: toAlpha = “0.1″ android: duration = “2000″ /> < br />
< br /> < br /> < br /> < br />
< br />
< br /> android: toAlpha = “0.1″ android: duration = “2000″ < br />
< br /> < br />
< br /> android: pivotX =” 50% “android: pivotY =” 50% “ < br /> six, vibration effects STRONG> < br />
android: pivotX = “50%” android: pivotY = “50%”
android: toXScale = “1.0″ android: fromYScale = “0.0″
/>
android: repeatCount = “infinite” />
animation start position of the Y coordinate.
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.
xmlns: android = “http://schemas.android.com/apk/res / android “
Third, the rotation tween STRONG>
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
android: interpolator = “@ android: anim / accelerate_interpolator”
android: cycles = “18″ />
< wbr />
animation end of the X coordinate.
start vibrating effect of the code is as follows:
animation end of the Y coordinate.
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.
android: fromXDelta = “-320″
five, along with a variety of tween application STRONG>
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″
android: repeatMode
android: duration = “2000″ />
android: toXScale = “0.2″ android: fromYScale = “1.0″
1,
