我创建动画,在动画开始时我正在改变某些按钮的样式然后在动画结束时我将按钮样式更改回其先前的样式但是没有讨厌它仍然显示相同的样式在onAnimationStart()中设置 每一件事看起来都很好,控件也在onActionEnd()中循环,但仍然没有按钮样式的更新。请帮助
public void WrongAnim()
{
AlphaAnimation animation = new AlphaAnimation(1, 0.5f);
//animation.setRepeatCount(1);
animation.setDuration(2000);
animation.setAnimationListener(new AnimationListener(){
@Override
public void onAnimationEnd(Animation arg0) {
// TODO Auto-generated method stub
Log.v("Wronganim", "end...");
for(int i=0; i<input_boxes.size(); i++)
{
input_boxes.get(i).getBox().setTextAppearance(context, R.style.textstyle);
}
}
@Override
public void onAnimationRepeat(Animation arg0) {
// TODO Auto-generated method stub
}
@Override
public void onAnimationStart(Animation arg0) {
// TODO Auto-generated method stub
Log.v("Wronganim", "start......");
for(int i=0; i<input_boxes.size(); i++)
{
input_boxes.get(i).getBox().setTextAppearance(context, R.style.redtext);
}
}
});
inputbar.startAnimation(animation); //lienar layout inflate from xml
}