List of usage examples for android.animation Animator start
public void start()
From source file:Main.java
public static void circularShow(final View view) { Animator anim = createCircularShowAnimator(view); if (anim != null) anim.start(); }
From source file:Main.java
public static void circularHide(final View view, Animator.AnimatorListener listener) { Animator anim = createCircularHideAnimator(view, listener); if (anim != null) anim.start(); }
From source file:Main.java
public static void animAlpha(View view, float fromAlpha, float toAlpha, int duration, int delay) { Animator anim = ObjectAnimator.ofFloat(view, "alpha", fromAlpha, toAlpha).setDuration(duration); anim.setStartDelay(delay);/*ww w.j ava 2 s . co m*/ anim.start(); }
From source file:Main.java
public static boolean start(Animator animator) { if (animator != null && animator.isStarted() == false) { animator.setupStartValues();// w w w . j ava2 s. c o m animator.start(); return true; } return false; }
From source file:Main.java
public static void showRevealEFfect(final View v, int centerX, int centerY, Animator.AnimatorListener lis) { v.setVisibility(View.VISIBLE); int height = v.getHeight(); Animator anim = ViewAnimationUtils.createCircularReveal(v, centerX, centerY, 0, height); anim.setDuration(350);/*from w w w. j a v a 2 s . com*/ anim.addListener(lis); anim.start(); }
From source file:Main.java
@TargetApi(21) public static Animator circleReveal(View v, int centerX, int centerY, float startRadius, float endRadius, int duration) { Animator anim = ViewAnimationUtils.createCircularReveal(v, centerX, centerY, startRadius, endRadius); anim.setDuration(duration);/*from w w w .ja v a2s . com*/ anim.setInterpolator(mAccelerateInterpolator); anim.start(); return anim; }
From source file:Main.java
@SuppressLint("NewApi") public static void startOrResumeAnimator(Animator animator) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { if (animator.isPaused()) { animator.resume();//from ww w . j a v a 2s .c o m return; } } animator.start(); }
From source file:Main.java
public static void showRevealEffect(final View v, int centerX, int centerY, @Nullable Animator.AnimatorListener lis) { v.setVisibility(View.VISIBLE); int finalRadius = Math.max(v.getWidth(), v.getHeight()); Animator anim = ViewAnimationUtils.createCircularReveal(v, centerX, centerY, 0, finalRadius); anim.setDuration(REVEAL_DURATION);//from ww w. j a v a 2 s . c om if (lis != null) anim.addListener(lis); anim.start(); }
From source file:Main.java
@SuppressLint("NewApi") public static void revealView(View toBeRevealed, View frame) { try {// w w w.jav a2 s.c om if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP) { // get the center for the clipping circle int cx = (frame.getLeft() + frame.getRight()) / 2; int cy = (frame.getTop() + frame.getBottom()) / 2; // get the final radius for the clipping circle int finalRadius = Math.max(frame.getWidth(), frame.getHeight()); // create the animator for this view (the start radius is zero) Animator anim = ViewAnimationUtils.createCircularReveal(toBeRevealed, cx, cy, 0, finalRadius); // make the view visible and start the animation toBeRevealed.setVisibility(View.VISIBLE); anim.start(); } else { toBeRevealed.setVisibility(View.VISIBLE); } } catch (Exception e) { e.printStackTrace(); } }
From source file:Main.java
@SuppressLint("NewApi") public static void revealView(View toBeRevealed, View frame) { try {// ww w.j av a 2 s.c o m if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP) { // get the center for the clipping circle int cx = (frame.getLeft() + frame.getRight()) / 2; int cy = (frame.getTop() + frame.getBottom()) / 2; // get the final radius for the clipping circle int finalRadius = Math.max(frame.getWidth(), frame.getHeight()); Log.v("INFO", "Radius: " + finalRadius); // create the animator for this view (the start radius is zero) Animator anim = ViewAnimationUtils.createCircularReveal(toBeRevealed, cx, cy, 0, finalRadius); // make the view visible and start the animation toBeRevealed.setVisibility(View.VISIBLE); anim.start(); } else { toBeRevealed.setVisibility(View.VISIBLE); } } catch (Exception e) { e.printStackTrace(); } }