java代码:
final ImageSwitcher switcher = (ImageSwitcher)findViewById(R.id.switcher);
this.image.setInAnimation(AnimationUtils.makeInAnimation(this, true)); // true从左淡入,false从右淡入
this.image.setOutAnimation(AnimationUtils.makeOutAnimation(this, true)); // true从右淡出,false从左淡入出
//this.image.setInAnimation(this, android.R.anim.fade_in); //淡入
//this.image.setOutAnimation(this, android.R.anim.fade_out); //淡出
switcher.setFactory(new ViewFactory()
{
@Override
public ......
阅读全文