List of usage examples for android.animation AnimatorSet AnimatorSet
public AnimatorSet()
From source file:Main.java
public static AnimatorSet playSequentially(Animator... animators) { AnimatorSet set = new AnimatorSet(); set.playSequentially(animators); return set; }
From source file:Main.java
public static AnimatorSet fadeOutSet(View v, float x) { AnimatorSet fadeOutSet = new AnimatorSet(); fadeOutSet.playTogether(alfaDisappear(v), translationRight(v, x)); return fadeOutSet; }
From source file:Main.java
public static void playTogether(ObjectAnimator... animator) { AnimatorSet animatorSet = new AnimatorSet(); animatorSet.setDuration(200);//from w ww. j av a2 s .com animatorSet.playTogether(animator); animatorSet.start(); }
From source file:Main.java
public static void animatePulse(final View target) { AnimatorSet set = new AnimatorSet(); set.playTogether(ObjectAnimator.ofFloat(target, "scaleY", 1, 1.1f, 1), ObjectAnimator.ofFloat(target, "scaleX", 1, 1.1f, 1)); set.setDuration(1000);/*from w ww . jav a2 s. c o m*/ set.start(); }
From source file:Main.java
public static void animateBounceIn(final View target) { AnimatorSet set = new AnimatorSet(); set.playTogether(ObjectAnimator.ofFloat(target, "alpha", 0, 1, 1, 1), ObjectAnimator.ofFloat(target, "scaleX", 0.3f, 1.05f, 0.9f, 1), ObjectAnimator.ofFloat(target, "scaleY", 0.3f, 1.05f, 0.9f, 1)); set.setDuration(500);// ww w. j av a 2s . c om target.setVisibility(View.VISIBLE); set.start(); }
From source file:Main.java
private static AnimatorSet buildMenuAnimation(View target, float alpha, int animationDuration) { AnimatorSet alphaAnimation = new AnimatorSet(); alphaAnimation.playTogether(ObjectAnimator.ofFloat(target, "alpha", alpha)); alphaAnimation.setDuration(animationDuration); return alphaAnimation; }
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);//w w w . j a v a2 s . co m yRollover.start(); }
From source file:Main.java
public static AnimatorSet getScaleAnimator(View view, float startScale, float endScale) { AnimatorSet set = new AnimatorSet(); ObjectAnimator scaleXAnimator = ObjectAnimator.ofFloat(view, View.SCALE_X, startScale, endScale); ObjectAnimator scaleYAnimator = ObjectAnimator.ofFloat(view, View.SCALE_Y, startScale, endScale); set.playTogether(scaleXAnimator, scaleYAnimator); return set;/*from w w w.j av a2 s . c o m*/ }
From source file:Main.java
@NonNull public static AnimatorSet getAnimatorSet(long duration, Interpolator interpolator) { final AnimatorSet animatorSet = new AnimatorSet(); animatorSet.setDuration(duration);//from ww w .j a v a2 s. c o m if (interpolator != null) { animatorSet.setInterpolator(interpolator); } return animatorSet; }
From source file:Main.java
public static void animFlicker(View view, long duration, int repeatCount) { AnimatorSet animatorSet = new AnimatorSet(); ObjectAnimator alphaIn = ObjectAnimator.ofFloat(view, "alpha", 0.0f, 1.0f); ObjectAnimator alphaOut = ObjectAnimator.ofFloat(view, "alpha", 1.0f, 0.0f); alphaIn.setDuration(duration);// w w w . j a v a 2 s. co m alphaIn.setStartDelay(duration); alphaOut.setDuration(duration); alphaOut.setRepeatCount(repeatCount); alphaIn.setRepeatCount(repeatCount); animatorSet.playTogether(alphaOut, alphaIn); animatorSet.start(); }