Code example for ScaleAnimation

Methods: setDuration, setFillAfter, setFillEnabled

0
					// params.width=(int)(480*(scaleRate+1)); 
					// params.height = 400; 
					// params.width = 300; 
					// gallery.getChildAt(0).setLayoutParams(new 
					// Gallery.LayoutParams(300, 300)); 
					Animation myAnimation_Scale = new ScaleAnimation(currentScale, currentScale + scaleRate, currentScale, currentScale + scaleRate, Animation.RELATIVE_TO_SELF, 0.5f,
							Animation.RELATIVE_TO_SELF, 0.5f);
					// Animation myAnimation_Scale = new 
					// ScaleAnimation(currentScale, 1+scaleRate, currentScale, 
					// 1+scaleRate); 
					myAnimation_Scale.setDuration(100);
					myAnimation_Scale.setFillAfter(true);
					myAnimation_Scale.setFillEnabled(true);
					// gallery.getChildAt(0).startAnimation(myAnimation_Scale); 
 
					// gallery.startAnimation(myAnimation_Scale); 
					currentScale = currentScale + scaleRate;
					// gallery.getSelectedView().setLayoutParams(new 
					// Gallery.LayoutParams((int)(480), (int)(800))); 
					// Log.i("", 
					// "===========:::"+gallery.getSelectedView().getLayoutParams().height);