Skip to content Skip to sidebar Skip to footer

Android Viewflipper Animation

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 l

Solution 1:

I see no problems with your code, when I use the standard android.R.anim.fade_in and android.R.anim.fade_out. This leads me to believe that the issue has to do with your fade animations; try using the built-in Android fades and see if that helps.

Also, you should be using ImageView.setImageResource() or ImageView.setImageDrawable() rather than ImageView.setBackgroundDrawable().

Solution 2:

Have you tried:

    mFlipper.setInAnimation(AnimationUtils.loadAnimation(this,
             R.anim.fade_in));
     mFlipper.setOutAnimation(AnimationUtils.loadAnimation(this,
             R.anim.fade_out));

Taken from here

Post a Comment for "Android Viewflipper Animation"