0825
1.
// setInAnimation(AnimationUtils.loadAnimation(context, R.anim.in_animation));
// setOutAnimation(AnimationUtils.loadAnimation(context, R.anim.out_animation));
TranslateAnimation in_animation = new TranslateAnimation(0.0f, 0.0f, 100.0f, 0.0f);
in_animation.setDuration(1000);
this.startAnimation(in_animation);
TranslateAnimation out_animation = new TranslateAnimation(0.0f, 0.0f, 1000.0f, 0.0f);
out_animation.setDuration(1000);
this.startAnimation(out_animation);
TextSwitchView里面的将静态XML写法转化成java写法