Quantcast
Channel: User Imran - Stack Overflow
Viewing all articles
Browse latest Browse all 16

Answer by Imran for Animate Alpha ImageView Fade In Fade Out

$
0
0

Simply does not appear again, possibly because under the hood, it called onAnimationRepeat when called the second time. So the best solution was to use an Animation class directly in this instance. If anybody can answer why the original code does not work, I would be very interested in learning why.

    Animation a = new AlphaAnimation(1.00f, 0.00f);    a.setDuration(3000);    a.setAnimationListener(new Animation.AnimationListener() {        public void onAnimationStart(Animation animation) {            // TODO Auto-generated method stub        }        public void onAnimationRepeat(Animation animation) {            // TODO Auto-generated method stub        }        public void onAnimationEnd(Animation animation) {            imageView.setVisibility(View.GONE);        }    });    imageView.startAnimation(a);

Viewing all articles
Browse latest Browse all 16

Latest Images

Trending Articles





Latest Images