private ImageView img_down; // 初始化图片
private RotateAnimation animation ;//初始化动画控件
|
protected void beforeInitView() {
animation = new RotateAnimation(0, -180, RotateAnimation.RELATIVE_TO_SELF, 0.5f, RotateAnimation.RELATIVE_TO_SELF, 0.5f); //设置动画效果
animation.setDuration(50);//执行时间
animation.setFillAfter(true);//停留在当前页面
}
|
img_down.clearAnimation(); //加载动画之前要清楚之前动画效果
img_down.setAnimation(animation);//把动画效果加载到所选择的空间中去
|