Animation getDuration - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Animation getDuration method.

This code example shows how to use the following methods:getDuration, initialize, setFillBefore, setStartTime, getClass
This code example shows how to use the following methods:getDuration, setAnimationListener
    		}*/ 
    		/*if (null != mAnimation) { 
    			mAnimation.reset(); 
    		}*/ 
    		mAnimation = animation;
    		animationDuration=mAnimation.getDuration();
    		if (!(animation instanceof TranslateAnimation)) {
    			rotateOffset = 0;
    		} else { 
    			rotateOffset = (int) (360/(animationDuration/20));//20 degree
    		} 
    		super.startAnimation(animation);
    		mAnimation.setAnimationListener(this);
    	} 
 
 
    	public void startAnimation2(Animation animation,int offset) {
    		animationTime=System.currentTimeMillis();
    		/*if (isAnimation) { 
    			return; 
4
CodeRank
This code example shows how to use the following methods:getDuration, getStartOffset
	 * Gets the in animation time. 
	 *  
	 * @return the in animation time 
	 */ 
	public long getInAnimationTime() { 
		return mInAnimation.getDuration() + mInAnimation.getStartOffset();
	} 
 
	/** 
	 * Gets the out animation time. 
	 *  
	 * @return the out animation time 
	 */ 
	public long getOutAnimationTime() { 
		return mOutAnimation.getDuration() + mOutAnimation.getStartOffset();
	} 
 
	/* 
	 * (non-Javadoc) 
	 *  
4
CodeRank
This code example shows how to use the following methods:getDuration
                // the top, to aid the illusion that the widget becomes the search dialog. 
                // Otherwise, there is a short delay when the widget reaches the top before 
                // the search dialog shows. We do this roughly 80ms before the animation ends. 
                getHandler().postDelayed(
                        mShowSearchDialogRunnable,
                        Math.max(mMorphAnimation.getDuration() - TIME_BEFORE_ANIMATION_END, 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(); 
            } 
4
CodeRank

Related Animation getDuration Questions & Answers:

getDuration Method Overview
How long this animation should last
See Code Examples for other Android Animation Methods: