Code example for Animation

Methods: setAnimationListener, setFillAfter, setFillBefore, setInterpolator

0
            } 
        }); 
 
        mUnmorphAnimation = new FromParentOriginAnimation();
        // stay in the top position until the animation starts 
        mUnmorphAnimation.setFillBefore(true);
        // no need to apply transformation after the animation finishes, 
        // since the gadget is now back in its normal place. 
        mUnmorphAnimation.setFillAfter(false);
        mUnmorphAnimation.setInterpolator(interpolator);
        mUnmorphAnimation.setAnimationListener(new Animation.AnimationListener(){
            public void onAnimationEnd(Animation animation) {
                clearAnimation(); 
            } 
            public void onAnimationRepeat(Animation animation) { }
            public void onAnimationStart(Animation animation) { }
        }); 
         
        mVoiceSearchIntent = new Intent(android.speech.RecognizerIntent.ACTION_WEB_SEARCH);
        mVoiceSearchIntent.putExtra(android.speech.RecognizerIntent.EXTRA_LANGUAGE_MODEL,
                android.speech.RecognizerIntent.LANGUAGE_MODEL_WEB_SEARCH);