List of usage examples for android.view.animation AccelerateDecelerateInterpolator AccelerateDecelerateInterpolator
public AccelerateDecelerateInterpolator()
From source file:Main.java
public static void fadeOut(View v) { v.animate().setInterpolator(new AccelerateDecelerateInterpolator()).setDuration(ANIMATION_DURATION).alpha(0) .start();/*www . ja v a2s. c om*/ }
From source file:Main.java
public static void slideInDown(View v) { v.setTranslationY(-v.getMeasuredHeight()); v.setVisibility(View.VISIBLE); v.animate().setInterpolator(new AccelerateDecelerateInterpolator()).setDuration(ANIMATION_DURATION) .translationY(0).start();//from w w w. j a va2 s . c o m }
From source file:Main.java
public static void arrowUpAnim(View view) { ObjectAnimator animator = ObjectAnimator.ofFloat(view, "rotation", 0f, 180f); animator.setDuration(400);// www.j ava2 s. c om animator.setInterpolator(new AccelerateDecelerateInterpolator()); animator.start(); }
From source file:Main.java
public static void arrowDownAnim(View view) { ObjectAnimator animator = ObjectAnimator.ofFloat(view, "rotation", 180f, 0f); animator.setDuration(400);//from w w w . ja v a2 s.c o m animator.setInterpolator(new AccelerateDecelerateInterpolator()); animator.start(); }
From source file:Main.java
public static void animation4(final View view) { ObjectAnimator animator = ObjectAnimator.ofFloat(view, "translationY", -100f); animator.setDuration(500);// w ww. j a v a 2s . c om animator.setInterpolator(new AccelerateDecelerateInterpolator()); animator.start(); }
From source file:Main.java
public static Animator moveScrollViewToX(View view, int toX, int time, int delayTime, boolean isStart) { ObjectAnimator objectAnimator = ObjectAnimator.ofInt(view, "scrollX", new int[] { toX }); objectAnimator.setDuration(time);/*from www . j a v a2s. c o m*/ objectAnimator.setInterpolator(new AccelerateDecelerateInterpolator()); objectAnimator.setStartDelay(delayTime); if (isStart) objectAnimator.start(); return objectAnimator; }
From source file:Main.java
public static Animation slideOutAnimation() { Animation outtoRight = 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); outtoRight.setDuration(500);/* w w w. j av a 2 s. c o m*/ outtoRight.setInterpolator(new AccelerateDecelerateInterpolator()); return outtoRight; }
From source file:Main.java
public static Animation slideInAnimation() { Animation inFromRight = new TranslateAnimation(Animation.RELATIVE_TO_PARENT, +1.0f, Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, 0.0f); inFromRight.setDuration(500);/*from ww w.j av a 2 s . c o m*/ inFromRight.setInterpolator(new AccelerateDecelerateInterpolator()); return inFromRight; }
From source file:Main.java
public static Animation inFromLeftAnimation() { Animation inFromLeft = new TranslateAnimation(Animation.RELATIVE_TO_PARENT, -1.0f, Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, 0.0f); inFromLeft.setDuration(DURATION);/*from w w w. ja v a 2s . c om*/ inFromLeft.setInterpolator(new AccelerateDecelerateInterpolator()); return inFromLeft; }
From source file:Main.java
public static Animation inFromRightAnimation() { Animation inFromRight = new TranslateAnimation(Animation.RELATIVE_TO_PARENT, +1.0f, Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, 0.0f); inFromRight.setDuration(DURATION);//from w ww . j a v a 2 s .c o m inFromRight.setInterpolator(new AccelerateDecelerateInterpolator()); return inFromRight; }