Skip to content Skip to sidebar Skip to footer

Make An Imageview Visible With Timer

I know that this question has been answered, but CountdownTimer doesn't work into my method. So basically I have an animation for a button and a textview, after a button is clicked

Solution 1:

Maybe you need use AnimationListener

    ....
    TranslateAnimation slide = new TranslateAnimation(0, 0, 100,0 );

    slide.setAnimationListener(new Animation.AnimationListener() {
        @Override
        public void onAnimationStart(Animation animation) {

        }

        @Override
        public void onAnimationEnd(Animation animation) {
            imageview.setVisible(View.VISIBLE);
        }

        @Override
        public void onAnimationRepeat(Animation animation) {

        }
    });

    slide.setDuration(1000);   
    slide.setFillAfter(true);   
    edittext.startAnimation(slide); 
    ....

Post a Comment for "Make An Imageview Visible With Timer"