Hi guys, I'm stuck on a simple problem which is driving me nuts. Basically I have 2 ImageViews, I'm trying to have the first show for a second, then fade out to show the second. I've been looking into using ViewFlipper, example code below, but the animation is non-existent.
ViewFlipper mFlipper = new ViewFlipper(this);
ImageView i = new ImageView(this);
i.setBackgroundDrawable(getResources().getDrawable(R.drawable.c1));
ImageView i2 = new ImageView(this);
i2.setBackgroundDrawable(getResources().getDrawable(R.drawable.c2));
mFlipper.setInAnimation(AnimationUtils.loadAnimation(this,
R.anim.fade));
mFlipper.setOutAnimation(AnimationUtils.loadAnimation(this,
R.anim.fade));
mFlipper.addView(i);
mFlipper.addView(i2);
mFlipper.startFlipping();
setContentView(mFlipper);
I'm not sure if I'm even on the right track using a viewFlipper so any help would be greatly appreciated!
Cheers