Android 渐变动画效果
//透明度渐变
AlphaAnimation a = new AlphaAnimation(0.1f, 1.0f);
//设置动画时间
a.setDuration(5000);
content.setAnimation(a); //content为定义的view
a.setAnimationListener(new AnimationListener() {
@Override
public void onAnimationStart(Animation animation) {
// TODO Auto-generated method stub
}
@Override
public void onAnimationRepeat(Animation animation) {
// TODO Auto-generated method stub
}
@Override
public void onAnimationEnd(Animation animation) {
// TODO Auto-generated method stub
}
});