标签:
Animation.AnimationListener listener = new Animation.AnimationListener() { @Override public void onAnimationStart(Animation animation) { // imageView.setVisibility(View.VISIBLE); } @Override public void onAnimationEnd(Animation animation) { flp.setMargins(0,0, 0,ViewUtil.getDimenValue(context,"y200")); imageView.setLayoutParams(flp); } @Override public void onAnimationRepeat(Animation animation) { } };
onAnimationStart()方法里面设置,eg:
Animation translateAnim = AnimationUtils.loadAnimation(context, ResourceUtil.getAnimId(context,"splash_img_translate_anim")); fadeInScaleTranslateAnim.setAnimationListener(listener); translateAnim.setAnimationListener(new Animation.AnimationListener() { @Override public void onAnimationStart(Animation animation) { flp.setMargins(0,0, 0, ViewUtil.getDimenValue(context,"y50")); imageView.setLayoutParams(flp); } @Override public void onAnimationEnd(Animation animation) { } @Override public void onAnimationRepeat(Animation animation) { } });
标签:
原文地址:http://www.cnblogs.com/charlie098765/p/5718824.html