private RotateAnimation reverseAnimation; //旋转动画
animation = new RotateAnimation(0, -180,
RotateAnimation.RELATIVE_TO_SELF, 0.5f,
RotateAnimation.RELATIVE_TO_SELF, 0.5f);
animation.setInterpolator(new LinearInterpolator());
animation.setDuration(250);
animation.setFillAfter(true);
reverseAnimation = new RotateAnimation(-180, 0,
RotateAnimation.RELATIVE_TO_SELF, 0.5f,
RotateAnimation.RELATIVE_TO_SELF, 0.5f);
//动画速度
reverseAnimation.setInterpolator(new LinearInterpolator());
//持续时间
reverseAnimation.setDuration(200);
reverseAnimation.setFillAfter(true); //保留在终止位置
private ImageView arrowImageView;
arrowImageView.clearAnimation();
arrowImageView = (ImageView) headView.findViewById(R.id.head_arrowImageView);
arrowImageView.setMinimumWidth(70);
arrowImageView.setMinimumHeight(50);
arrowImageView.startAnimation(animation);