List of usage examples for android.animation ObjectAnimator start
@Override public void start()
From source file:Main.java
public static void rotateWithDuration(View view, int milliseconds, int radiusFrom, int radiusTo) { ObjectAnimator animation = ObjectAnimator.ofFloat(view, "rotation", radiusFrom, radiusTo); animation.setDuration(milliseconds); animation.start(); }
From source file:Main.java
public static void makeSnake(View v) { ObjectAnimator snake = ObjectAnimator.ofFloat(v, "translationX", 0, 10).setDuration(300); snake.setInterpolator(new CycleInterpolator(2)); snake.start(); }
From source file:Main.java
public static void slideFromLeftToRight(View view) { ObjectAnimator animator = ObjectAnimator.ofFloat(view, "X", -2000, 0).setDuration(1000); animator.setInterpolator(new LinearInterpolator()); animator.start(); }
From source file:Main.java
public static void rolloverY(View v) { ObjectAnimator yRollover = ObjectAnimator.ofFloat(v, "rotationY", 0f, 3600f); AnimatorSet set = new AnimatorSet(); set.play(yRollover);/*from w ww . j av a2 s . c o m*/ yRollover.start(); }
From source file:Main.java
public static void fadeOutView(View view) { ObjectAnimator animator = ObjectAnimator.ofFloat(view, "alpha", 1.0f, 0.8f, 0.5f, 0.3f, 0.0f); animator.setStartDelay(5000);//from w w w . java 2 s . c o m animator.setDuration(200); animator.start(); }
From source file:Main.java
public static ObjectAnimator rotate(View view, float startDegree, float endDegree, int duration) { ObjectAnimator animator = ObjectAnimator.ofFloat(view, "rotation", startDegree, endDegree); animator.setDuration(duration);//from w w w. j a v a 2 s .co m animator.setRepeatCount(-1); animator.start(); return animator; }
From source file:Main.java
public static ObjectAnimator toastAlpha(View view, float alpha, int duration, Interpolator interpolator) { ObjectAnimator objectAnimator = ObjectAnimator.ofFloat(view, "alpha", alpha); objectAnimator.setDuration(duration); objectAnimator.setInterpolator(interpolator); objectAnimator.start(); return objectAnimator; }
From source file:Main.java
public static ObjectAnimator translateToastByX(View view, float x, int duration, Interpolator interpolator) { ObjectAnimator objectAnimator = ObjectAnimator.ofFloat(view, "translationX", x); objectAnimator.setDuration(duration); objectAnimator.setInterpolator(interpolator); objectAnimator.start(); return objectAnimator; }
From source file:Main.java
public static ObjectAnimator translateToastByY(View view, float y, int duration, Interpolator interpolator) { ObjectAnimator objectAnimator = ObjectAnimator.ofFloat(view, "translationY", y); objectAnimator.setDuration(duration); objectAnimator.setInterpolator(interpolator); objectAnimator.start(); return objectAnimator; }
From source file:Main.java
public static void arrowDownAnim(View view) { ObjectAnimator animator = ObjectAnimator.ofFloat(view, "rotation", 180f, 0f); animator.setDuration(400);//from ww w . j a va2s .com animator.setInterpolator(new AccelerateDecelerateInterpolator()); animator.start(); }