Android CycleInterpolator - 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 CycleInterpolator class.

This code example shows how to use the following methods:
package com.barcicki.trio.core; 
 
import android.view.animation.CycleInterpolator; 
 
public class FailAnimation extends CardFlipAnimation { 
 
	public FailAnimation() { 
		super(0, 50); 
		setInterpolator(new CycleInterpolator(2f)); 
		setDuration(500); 
	} 
} 

5
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
 
        private void createAnimation() { 
            if (bounceAnim == null) {
                bounceAnim = ObjectAnimator.ofFloat(ball, "y",
                        ball.getY(), getHeight() - BALL_SIZE).setDuration(1500);
                bounceAnim.setInterpolator(new CycleInterpolator(2));
                bounceAnim.addUpdateListener(this);
            } 
        } 
 
        public void startAnimation() { 
            createAnimation(); 
            bounceAnim.start();
        } 
 
        public void seek(long seekTime) {
            createAnimation(); 
            bounceAnim.setCurrentPlayTime(seekTime);
        } 
 
5
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
 
        private void createAnimation() { 
            if (bounceAnim == null) {
                bounceAnim = ObjectAnimator.ofFloat(ball, "y",
                        ball.getY(), getHeight() - BALL_SIZE).setDuration(1500);
                bounceAnim.setInterpolator(new CycleInterpolator(2));
                bounceAnim.addUpdateListener(this);
            } 
        } 
 
        public void startAnimation() { 
            createAnimation(); 
            bounceAnim.start();
        } 
 
        public void seek(long seekTime) {
            createAnimation(); 
            bounceAnim.setCurrentPlayTime(seekTime);
        } 
 
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
//	    TranslateAnimation translate = new TranslateAnimation(50, 0, 200, 0);	//�ړ� 
//	    animeSet.addAnimation(alpha);  
	    animeSet.addAnimation(rotate);
	    animeSet.addAnimation(scale);
//	    animeSet.addAnimation(translate); 
	    animeSet.setInterpolator(new CycleInterpolator(5F));
	    animeSet.setAnimationListener(this);
    	animeSet.setDuration(24000);
    } 
     
	@Override 
	public void onAnimationStart(Animation animation) {
		Log.i(TAG,"onAnimationStart");
			//if(soundOnOff) soundplay.startMusic(); 
			soundplay.startMusic();
			button7.setText("�Ƃ߂�");
	  } 
	 
	@Override 
    public void onAnimationEnd(Animation arg0) {
3
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
			case 11: 
				return new OvershootInterpolator(); 
			case 12: 
				return new OvershootInterpolator(6.0f); 
			case 13: 
				return new CycleInterpolator(1.25f); 
		} 
		throw new RuntimeException(); 
	} 
} 
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
			case 0: t = new AccelerateDecelerateInterpolator(); break;
			case 1: t = new AccelerateInterpolator(); break;
			case 2: t = new AnticipateInterpolator(); break;
			case 3: t = new AnticipateOvershootInterpolator(); break;
			case 4: t = new BounceInterpolator(); break;
			case 5: t = new CycleInterpolator(5); break;
			case 6: t = new DecelerateInterpolator(); break;
			case 7: t = new LinearInterpolator(); break;
			case 8: t = new OvershootInterpolator(); break;
			default: t = new AccelerateInterpolator(); break;
				 
		} 
		 
		return t;
	} 
	 
	 
	 
	/** 
	 * IMAGE MANIPULATIONS!!! 
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
     * @param cycles the number of cycles to run the animation 
     * @return a timing function that causes the animation to cycle 
     */ 
    public static CycleInterpolator cycle(float cycles) 
    { 
        return new CycleInterpolator(cycles); 
    } 
 
 
    // ---------------------------------------------------------- 
    /** 
     * <p> 
     * A timing function that elastically snaps from the start value. 
     * </p><p> 
     * This timing function is represented by 
     * {@code TODO} 
     * where <em>t</em> is the current time in the animation normalized to the 
     * range [0.0, 1.0]. 
     * </p><p> 
     * This timing function corresponds to {@link ElasticInInterpolator} 
3
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
		//ScaleAnimation(float fromX, float toX, float fromY, float toY, float pivotX, float pivotY) 
		ScaleAnimation anim = new ScaleAnimation(1,2,1,2, 30, 60);
		//1000ms�̊Ԃ� 
		anim.setDuration(1000);
		//1���J���Ԃ� 
		anim.setInterpolator(new CycleInterpolator(1));
		anim.setAnimationListener(this);
		if(nowColor == WHITE){
			nowColor = BLACK;
			changeWhiteToBlack = true;
			peaceImage.bringToFront();
			peaceImage.startAnimation(anim);
		}else if(nowColor == BLACK){
			nowColor = WHITE;
			changeBlackToWhite = true;
			peaceImage.bringToFront();
			peaceImage.startAnimation(anim);
		}else{ 
			CellChangeFailedException e = new CellChangeFailedException("�����u�����Ă��܂����B");
			throw e;
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
		 
		//時間指定 
		scale.setDuration(200);
		 
		//繰り返し回数 
		scale.setInterpolator(new CycleInterpolator(0.5f));
		 
		v.startAnimation(scale);
	} 
} 
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
    //摇头效果 
    //ImageView tv = (ImageView) findViewById(R.id.logon_icon); 
    //ViewUtils.startShakeAnimation(tv); 
    public static void startShakeAnimation(View v) {
        int pivot = Animation.RELATIVE_TO_SELF;
        CycleInterpolator interpolator = new CycleInterpolator(3.0f);
        RotateAnimation animation = new RotateAnimation(0, 15, pivot, 0.5f, pivot, 0.5f);
        animation.setStartOffset(4000);
        animation.setDuration(2000);
        animation.setRepeatCount(Animation.INFINITE);
        animation.setInterpolator(interpolator);
        v.startAnimation(animation);
    } 
 
    public static int getPixelsOf(int i, float f)
    { 
        return (int)(0.5F + f * (float)i);
    } 
 
    public static int getPixelsOf(int i, Context context)
3
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
See Code Examples for Android CycleInterpolator Methods: