buder

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写法

 

 

 

 

 

 

 

 

 

posted on 2018-08-25 16:01  buder  阅读(184)  评论(0编辑  收藏  举报

导航