List of usage examples for android.view.animation AccelerateInterpolator AccelerateInterpolator
public AccelerateInterpolator()
From source file:Main.java
public static Animation inAlphaAnimation() { AlphaAnimation alpha = new AlphaAnimation(0.0f, 1.0f); alpha.setDuration(1000);/*from ww w .j a va 2 s . c om*/ alpha.setInterpolator(new AccelerateInterpolator()); return alpha; }
From source file:Main.java
public static Animation outAlphaAnimation() { AlphaAnimation alpha = new AlphaAnimation(1.0f, 0.0f); alpha.setDuration(1000);/*from w w w . j a v a2s . c o m*/ alpha.setInterpolator(new AccelerateInterpolator()); return alpha; }
From source file:Main.java
public static Animation getFadeOutAnimation(int durationInMilliseconds) { final Animation fadeOut = new AlphaAnimation(1, 0); fadeOut.setFillAfter(true);//from ww w . j a v a2 s . co m fadeOut.setInterpolator(new AccelerateInterpolator()); fadeOut.setDuration(durationInMilliseconds); return fadeOut; }
From source file:Main.java
public static Animation createAlphaAnimation(float fromAlpha, float toAlpha, long duration) { AlphaAnimation anim = new AlphaAnimation(fromAlpha, toAlpha); anim.setDuration(duration);//from ww w . jav a 2 s. co m anim.setInterpolator(new AccelerateInterpolator()); return anim; }
From source file:Main.java
public static void animation3(View view) { ObjectAnimator animator = new ObjectAnimator().ofFloat(view, "rotationY", 0.0f, 360f); animator.setDuration(4000);/*w w w .j a va2 s . co m*/ animator.setRepeatCount(2); animator.setInterpolator(new AccelerateInterpolator()); animator.start(); }
From source file:Main.java
public static Animation fadeOut() { Animation fadeout = new AlphaAnimation(+1.0f, 0.0f); fadeout.setDuration(DURATION);//w ww.ja v a 2s.co m fadeout.setInterpolator(new AccelerateInterpolator()); return fadeout; }
From source file:Main.java
public static void showViewSlide(View view) { if (view.getTag() == null) view.setTag(true);// w w w . ja v a2s . com boolean isVisible = (boolean) view.getTag(); if (!isVisible) { view.setTag(true); view.animate().translationY(0).setDuration(200).setInterpolator(new AccelerateInterpolator()).start(); } }
From source file:Main.java
public static Animator animFadeIn(View view) { ObjectAnimator objectanimator = ObjectAnimator.ofFloat(view, "alpha", new float[] { 0.3F, 1.0F }); objectanimator.setInterpolator(new AccelerateInterpolator()); return objectanimator; }
From source file:Main.java
public static Animator animFlow(android.animation.ValueAnimator.AnimatorUpdateListener animatorupdatelistener) { ValueAnimator valueanimator = ValueAnimator.ofFloat(new float[] { 0.0F, 1.0F }); valueanimator.setInterpolator(new AccelerateInterpolator()); valueanimator.addUpdateListener(animatorupdatelistener); return valueanimator; }
From source file:Main.java
public static Animation outToLeftAnimation() { Animation outtoLeft = new TranslateAnimation(Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, -1.0f, Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, 0.0f); outtoLeft.setDuration(350);/*w w w .j a v a2 s.c o m*/ outtoLeft.setInterpolator(new AccelerateInterpolator()); return outtoLeft; }