Code example for ScaleAnimation

Methods: setAnimationListenersetDurationsetFillAftersetInterpolator

0
			scrollTimer	=	null;
		} 
	} 
     
    public Animation scaleFaceUpAnimation(){
		Animation scaleFace = new ScaleAnimation(1.0f, 1.2f, 1.0f, 1.2f, Animation.RELATIVE_TO_SELF,0.5f,Animation.RELATIVE_TO_SELF,0.5f);
		scaleFace.setDuration(500);
		scaleFace.setFillAfter(true);
		scaleFace.setInterpolator(new AccelerateInterpolator());
		Animation.AnimationListener	scaleFaceAnimationListener = new Animation.AnimationListener() {			
			@Override 
			public void onAnimationStart(Animation arg0) {
				verticalTextView.setText(nameArray[(Integer) clickedButton.getTag()]);
				isFaceDown = false;
			}			 
			@Override 
			public void onAnimationRepeat(Animation arg0) {}			
			@Override 
			public void onAnimationEnd(Animation arg0) {
				if(faceTimer != null){
					faceTimer.cancel();
					faceTimer = null;
				} 
				 
				faceTimer = new Timer();
				if(faceAnimationSchedule != null){
					faceAnimationSchedule.cancel();
					faceAnimationSchedule = null;
				} 
				faceAnimationSchedule = new TimerTask() {					
					@Override 
					public void run() { 
						faceScaleHandler.sendEmptyMessage(0); 										
					} 
				}; 
				 
				faceTimer.schedule(faceAnimationSchedule, 750);				
			} 
		};  
		scaleFace.setAnimationListener(scaleFaceAnimationListener);
		return scaleFace;
	} 
     
    private Handler faceScaleHandler = new Handler() {
        @Override 
Stop searching for code, let great code find you!  Add Codota to your java IDE