[转]android animation的应用实例

阅读更多
	public static void Translate(View view, float fromX, float toX, float fromY,
			   float toY, long durationMillis) {
			AnimationSet  as = new AnimationSet(true);
			  TranslateAnimation ta = new TranslateAnimation(fromX, toX, fromY,
			    toY);
			  ta.setFillAfter(true);
			  ta.setFillBefore(false);
			  ta.setDuration(durationMillis);
			  as.addAnimation(ta);
			  //as.setFillAfter(true);
			  //as.setFillBefore(false);
			  view.startAnimation(as);
			 }

 

你可能感兴趣的:([转]android animation的应用实例)