List of usage examples for android.animation ObjectAnimator start
@Override public void start()
From source file:Main.java
public static void startAnim(View view) { view.clearAnimation();// ww w .jav a 2 s . c o m ObjectAnimator scaleY = ObjectAnimator.ofFloat(view, "scaleY", 0.2f, 1f); scaleY.setDuration(300); scaleY.start(); }
From source file:Main.java
public static void twinkle(View view) { ObjectAnimator animator = ObjectAnimator.ofFloat(view, "alpha", 1, 0.2f, 1); animator.setDuration(300);/*w ww. j a v a 2 s . c o m*/ animator.start(); }
From source file:Main.java
public static Animator doMoveVertical(View view, int startY, int endY, int duration) { ObjectAnimator animator = ObjectAnimator.ofFloat(view, "translationY", startY, endY).setDuration(duration); animator.start(); return animator; }
From source file:Main.java
public static void alpha(View view, float from, float to, int duration) { ObjectAnimator alpha = ObjectAnimator.ofFloat(view, "alpha", from, to); alpha.setDuration(duration);/*from w w w . j a va 2s . c om*/ alpha.start(); }
From source file:Main.java
public static void startRotationY(View view, float begin, float end, int durtion) { ObjectAnimator animator = ObjectAnimator.ofFloat(view, "rotationY", begin, end); animator.setDuration(durtion);/* w w w .j ava 2s . c o m*/ animator.start(); }
From source file:Main.java
public static void alphaShow(@NonNull final View view) { if (view.getWindowToken() == null) return;//from w w w. j a v a2s .c o m view.setVisibility(View.VISIBLE); ObjectAnimator alpha = ObjectAnimator.ofFloat(view, "alpha", 0f, 1f); alpha.setDuration(DURATION_MID); alpha.start(); }
From source file:Main.java
public static void rotationAngle(View view, float angleValue, long duration) { ObjectAnimator animator = ObjectAnimator.ofFloat(view, "rotation", 0f, angleValue); animator.setDuration(duration);//from w w w . ja v a 2 s. c om animator.start(); }
From source file:Main.java
public static Animator slide(@NonNull View view, int fromY, int toY, int time) { ObjectAnimator animatorY = ObjectAnimator.ofFloat(view, "translationY", fromY, toY); animatorY.setDuration(time);/* w ww . ja v a2s. c om*/ animatorY.start(); return animatorY; }
From source file:Main.java
public static void backgroundToWhite(View view) { ObjectAnimator animator = ObjectAnimator.ofInt(view, "backgroundColor", 0xffbdbdbd, 0xffffffff); animator.setDuration(1);/*from w ww . j a v a 2s. c om*/ animator.start(); }
From source file:Main.java
public static void backgroundToGrey(View view) { ObjectAnimator animator = ObjectAnimator.ofInt(view, "backgroundColor", 0xffffffff, 0xffbdbdbd); animator.setDuration(1);/*from ww w . j a v a 2s . c o m*/ animator.start(); }