Code example for ObjectAnimator

Methods: addUpdateListener, setDuration, setInterpolator, start

-3
					{ 
                		final FrameLayout.LayoutParams flp = (FrameLayout.LayoutParams)mVertical.getLayoutParams(); 
                		int dstTopMargin = Math.min(Math.max(mMinMarginTop, getFinalDistance((int)getSplineFlingDistance(velocityY)) + flp.topMargin), mMaxMarginTop); 
						 
                		mVerticalAnimation = ObjectAnimator.ofInt(mVertical, "topMargin", flp.topMargin, dstTopMargin); 
                		mVerticalAnimation.setDuration(mAnimationDuration); 
                		mVerticalAnimation.setInterpolator(new DecelerateInterpolator()); 
                		mVerticalAnimation.addUpdateListener(new AnimatorUpdateListener() { 
							 
							@Override 
							public void onAnimationUpdate(ValueAnimator animation) { 
								// TODO Auto-generated method stub 
								flp.topMargin = ((Integer)animation.getAnimatedValue()).intValue(); 
								requestLayout(); 
							} 
						}); 
                		mVerticalAnimation.start(); 
					} 
                	 
                } 
                else 
                {