Code example for Animation

Methods: hasStarted, reset

0
 
    public void startShowAnimation() 
    { 
        view.post(new Runnable() {
            public void run() { 
                if ( anim_fadeout.hasStarted() )
                { 
                    anim_fadeout.reset();
                } 
                view.setVisibility(View.VISIBLE);
                view.startAnimation(anim_fadein);    			
            } 
        }); 
    } 
 
    public void startHideAnimation() { 
        Log.d(LOG_TAG, "startHideAnimation");
        view.post(new Runnable() {
            public void run() { 
                view.startAnimation(anim_fadeout);
            }