Android DecelerateInterpolator - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android DecelerateInterpolator class.

This code example shows how to use the following methods:
This code example shows how to use the following methods:
                ObjectAnimator animDown = ObjectAnimator.ofFloat(ball2, "y",
                        0f, getHeight() - ball2.getHeight()).setDuration(500);
                animDown.setInterpolator(new AccelerateInterpolator());
                ObjectAnimator animUp = ObjectAnimator.ofFloat(ball2, "y",
                        getHeight() - ball2.getHeight(), 0f).setDuration(500);
                animUp.setInterpolator(new DecelerateInterpolator());
                AnimatorSet s1 = new AnimatorSet();
                s1.playSequentially(animDown, animUp);
                animDown.addUpdateListener(this);
                animUp.addUpdateListener(this);
                AnimatorSet s2 = (AnimatorSet) s1.clone();
                s2.setTarget(balls.get(3));
 
                animation = new AnimatorSet();
                animation.playTogether(anim1, anim2, s1);
                animation.playSequentially(s1, s2);
            } 
        } 
 
        private ShapeHolder addBall(float x, float y) {
7
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
/** 
 * This class is a container for a Drawable with multiple animated properties. 
 * 
 */ 
public class DrawableHolder implements AnimatorListener {
    public static final DecelerateInterpolator EASE_OUT_INTERPOLATOR = new DecelerateInterpolator();
    private static final String TAG = "DrawableHolder";
    private static final boolean DBG = false;
    private float mX = 0.0f;
    private float mY = 0.0f;
    private float mScaleX = 1.0f;
    private float mScaleY = 1.0f;
    private BitmapDrawable mDrawable;
    private float mAlpha = 1f;
    private ArrayList<ObjectAnimator> mAnimators = new ArrayList<ObjectAnimator>();
    private ArrayList<ObjectAnimator> mNeedToStart = new ArrayList<ObjectAnimator>();
 
    public DrawableHolder(BitmapDrawable drawable) {
        this(drawable, 0.0f, 0.0f);
    } 
7
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
					0.5f); 
 
			retval.setDuration(500);
			retval.setFillEnabled(true);
			retval.setFillAfter(true);
			retval.setInterpolator(new DecelerateInterpolator());
		} 
 
		return retval;
	} 
	 
	public static int toDegrees(Side side){
		int degree = 0;
		switch(side){
		case TOP:
			degree = 0;
			break; 
		case RIGHT:
			degree = 90;
			break; 
7
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
                rotation = new Rotate3dAnimation(90, 0, centerX, centerY, 310.0f, false);
            } 
 
            rotation.setDuration(500);
            rotation.setFillAfter(true);
            rotation.setInterpolator(new DecelerateInterpolator());
 
            mContainer.startAnimation(rotation);
        } 
    } 
 
} 
6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:getInterpolation
        if (millisLeft <= 0) {
            reset(); 
            return; 
        } 
        // from 0 to 1 as animation progresses 
        float interpolation =
                mInterpolator.getInterpolation((float) millisSoFar / mAnimationDuration);
        final int dx = (int) (totalDeltaX * (1 - interpolation));
        mRotaryOffsetX = mAnimatingDeltaXEnd + dx;
 
        // once we have gone far enough to animate the current buttons off screen, we start 
        // wrapping the offset back to the other side so that when the animation is finished, 
        // the buttons will come back into their original places. 
        if (mDimplesOfFling > 0) {
            if (!goingRight && mRotaryOffsetX < -3 * mDimpleSpacing) {
                // wrap around on fling left 
                mRotaryOffsetX += mDimplesOfFling * mDimpleSpacing;
            } else if (goingRight && mRotaryOffsetX > 3 * mDimpleSpacing) {
                // wrap around on fling right 
                mRotaryOffsetX -= mDimplesOfFling * mDimpleSpacing;
6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
This code example shows how to use the following methods:
                ObjectAnimator animDown = ObjectAnimator.ofFloat(ball2, "y",
                        0f, getHeight() - ball2.getHeight()).setDuration(500);
                animDown.setInterpolator(new AccelerateInterpolator());
                ObjectAnimator animUp = ObjectAnimator.ofFloat(ball2, "y",
                        getHeight() - ball2.getHeight(), 0f).setDuration(500);
                animUp.setInterpolator(new DecelerateInterpolator());
                AnimatorSet s1 = new AnimatorSet();
                s1.playSequentially(animDown, animUp);
                animDown.addUpdateListener(this);
                animUp.addUpdateListener(this);
                AnimatorSet s2 = (AnimatorSet) s1.clone();
                s2.setTarget(balls.get(3));
 
                animation = new AnimatorSet();
                animation.playTogether(anim1, anim2, s1);
                animation.playSequentially(s1, s2);
            } 
        } 
 
        private ShapeHolder addBall(float x, float y) {
6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
This code example shows how to use the following methods:
			rotationClock.setInterpolator(new DecelerateInterpolator());
 
			rotationCounterClock = new Flip3dAnimation(-90, 0, centerX, centerY);
			rotationCounterClock.setDuration(300);
			rotationCounterClock.setFillAfter(true);
			rotationCounterClock.setInterpolator(new DecelerateInterpolator());
		} 
 
		public void run() { 
			if (flipGridIn) {
				parent.startAnimation(rotationClock);
				view1.setVisibility(View.GONE);
				view1.setEnabled(false);
				view2.setVisibility(View.VISIBLE);
				view2.setEnabled(true);
				//view2.requestFocus(); 
				 
			} else { 
				parent.startAnimation(rotationCounterClock);
				view2.setVisibility(View.GONE);
6
CodeRank
Experience pair programming with AI  Get Codota for Java

Related Android DecelerateInterpolator Questions & Answers:

See Code Examples for Android DecelerateInterpolator Methods: