android
Animation TranslateAnimation eg:
Animation animation = new TranslateAnimation(0,50,0,50); 3: y
http://www.toceansoft.com
1/3
-Android
0,0)
TranslateAnimation(fromXType, fromXValue, toXType, toXValue, fromYType, fromYValue, toYType, toYValue)
1,
AnimationAnimation.RELATIVE_TO_SELF ScaleAnimation eg:
Animation animation = new
ScaleAnimation(1f,0.2f,1f,0.2f,Animation.RELATIVE_TO_SELF,0.5f,Animation.RELATIVE_TO_SELF,0.5f);
(1f) (0.2f0.2) (1f) (0.2f0.2)
6:(0.5f0.5)
8:(0.5f0.5) RotateAnimation eg:
Animation animation = new
RotateAnimation(360,0,Animation.RELATIVE_TO_SELF,0.5f,Animation.RELATIVE_TO_SELF,0.5f);
http://www.toceansoft.com
2/3
-Android
AlphaAnimation eg:
Animation animation = new AlphaAnimation(1f,0.1f); 1: ; 2: ;
//
animation.setDuration(2000);
eg
// androidandroid.R.anim.
animation.setInterpolator(Main.this,android.R.anim.anticipate_overshoot_interpolator);
AnimationSet AnimationSet animationSet = new AnimationSet(false); animationSet.addAnimation(animation);
viewstartAnimation(animation)
AnimationSet Animation(Animation)(AnimationSet )
http://www.toceansoft.com
3/3
因篇幅问题不能全部显示,请点此查看更多更全内容