[转]android animation的使用实例

[转]android animation的应用实例public static void Translate(View view, float fromX, float toX, floa

[转]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); }

?