Java Code Examples for io.codetail.animation.SupportAnimator#setStartDelay()
The following examples show how to use
io.codetail.animation.SupportAnimator#setStartDelay() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: NavHeaderView.java From SmartPack-Kernel-Manager with GNU General Public License v3.0 | 6 votes |
public void animateBg() { mImage.setVisibility(INVISIBLE); int cx = mImage.getWidth(); int cy = mImage.getHeight(); SupportAnimator animator = ViewAnimationUtils.createCircularReveal(mImage, cx, cy, 0, Math.max(cx, cy)); animator.addListener(new SupportAnimator.SimpleAnimatorListener() { @Override public void onAnimationStart() { super.onAnimationStart(); mImage.setVisibility(VISIBLE); } }); animator.setStartDelay(500); animator.start(); }
Example 2
Source File: NavHeaderView.java From KernelAdiutor with GNU General Public License v3.0 | 6 votes |
public void animateBg() { mImage.setVisibility(INVISIBLE); int cx = mImage.getWidth(); int cy = mImage.getHeight(); SupportAnimator animator = ViewAnimationUtils.createCircularReveal(mImage, cx, cy, 0, Math.max(cx, cy)); animator.addListener(new SupportAnimator.SimpleAnimatorListener() { @Override public void onAnimationStart() { super.onAnimationStart(); mImage.setVisibility(VISIBLE); } }); animator.setStartDelay(500); animator.start(); }
Example 3
Source File: NotificationActivity.java From Twire with GNU General Public License v3.0 | 4 votes |
private SupportAnimator showTransitionAnimation() { // Get the center for the FAB int cx = (int) mContinueFABContainer.getX() + mContinueFABContainer.getMeasuredHeight() / 2; int cy = (int) mContinueFABContainer.getY() + mContinueFABContainer.getMeasuredWidth() / 2; // get the final radius for the clipping circle int dx = Math.max(cx, mTransitionViewWhite.getWidth() - cx); int dy = Math.max(cy, mTransitionViewWhite.getHeight() - cy); float finalRadius = (float) Math.hypot(dx, dy); mTransitionViewBlue.setLayerType(View.LAYER_TYPE_HARDWARE, null); mTransitionViewWhite.setLayerType(View.LAYER_TYPE_HARDWARE, null); final SupportAnimator whiteTransitionAnimation = ViewAnimationUtils.createCircularReveal(mTransitionViewWhite, cx, cy, 0, finalRadius); whiteTransitionAnimation.setInterpolator(new AccelerateDecelerateInterpolator()); whiteTransitionAnimation.setDuration(REVEAL_ANIMATION_DURATION); whiteTransitionAnimation.addListener(new SupportAnimator.AnimatorListener() { @Override public void onAnimationStart() { mTransitionViewWhite.bringToFront(); mTransitionViewWhite.setVisibility(View.VISIBLE); mContinueFABContainer.setClickable(false); if (mContinueIcon.getVisibility() == View.VISIBLE) { hideContinueIconAnimations(); } } @Override public void onAnimationEnd() { transitionAnimationWhite = whiteTransitionAnimation; } @Override public void onAnimationCancel() { } @Override public void onAnimationRepeat() { } }); final SupportAnimator blueTransitionAnimation = ViewAnimationUtils.createCircularReveal(mTransitionViewBlue, cx, cy, 0, finalRadius); blueTransitionAnimation.setInterpolator(new AccelerateDecelerateInterpolator()); blueTransitionAnimation.setDuration(REVEAL_ANIMATION_DURATION); blueTransitionAnimation.addListener(new SupportAnimator.AnimatorListener() { @Override public void onAnimationStart() { mTransitionViewBlue.setVisibility(View.VISIBLE); mTransitionViewBlue.bringToFront(); mContinueFABShadow.bringToFront(); mContinueFAB.bringToFront(); } @Override public void onAnimationEnd() { mTransitionViewBlue.setLayerType(View.LAYER_TYPE_NONE, null); mTransitionViewWhite.setLayerType(View.LAYER_TYPE_NONE, null); transitionAnimationBlue = blueTransitionAnimation; } @Override public void onAnimationCancel() { } @Override public void onAnimationRepeat() { } }); whiteTransitionAnimation.start(); blueTransitionAnimation.setStartDelay(REVEAL_ANIMATION_DELAY); blueTransitionAnimation.start(); return blueTransitionAnimation; }
Example 4
Source File: NotificationActivity.java From Twire with GNU General Public License v3.0 | 4 votes |
private void showReverseTransitionAnimation() { mTransitionViewBlue.setLayerType(View.LAYER_TYPE_HARDWARE, null); mTransitionViewWhite.setLayerType(View.LAYER_TYPE_HARDWARE, null); SupportAnimator blueReversed = transitionAnimationBlue.reverse(); blueReversed.setInterpolator(new AccelerateDecelerateInterpolator()); blueReversed.addListener(new SupportAnimator.AnimatorListener() { @Override public void onAnimationStart() { mTransitionViewBlue.setVisibility(View.VISIBLE); mTransitionViewBlue.bringToFront(); } @Override public void onAnimationEnd() { Service.bringToBack(mTransitionViewBlue); mTransitionViewBlue.setVisibility(View.INVISIBLE); } @Override public void onAnimationCancel() { } @Override public void onAnimationRepeat() { } }); blueReversed.setDuration(REVEAL_ANIMATION_DURATION); blueReversed.start(); final SupportAnimator whiteReversed = transitionAnimationWhite.reverse(); whiteReversed.setInterpolator(new AccelerateDecelerateInterpolator()); whiteReversed.addListener(new SupportAnimator.AnimatorListener() { @Override public void onAnimationStart() { mTransitionViewWhite.setVisibility(View.VISIBLE); mTransitionViewWhite.bringToFront(); } @Override public void onAnimationEnd() { Service.bringToBack(mTransitionViewWhite); mTransitionViewBlue.setLayerType(View.LAYER_TYPE_NONE, null); mTransitionViewWhite.setLayerType(View.LAYER_TYPE_NONE, null); mTransitionViewWhite.setVisibility(View.INVISIBLE); mContinueFABContainer.setClickable(true); mContinueIcon.bringToFront(); mContinueIcon.setVisibility(View.VISIBLE); showContinueIconAnimations(); } @Override public void onAnimationCancel() { } @Override public void onAnimationRepeat() { } }); whiteReversed.setDuration(REVEAL_ANIMATION_DURATION); whiteReversed.setStartDelay(REVEAL_ANIMATION_DELAY); whiteReversed.start(); }
Example 5
Source File: LoginActivity.java From Twire with GNU General Public License v3.0 | 4 votes |
/** * Animations only here from and down */ private void showTransitionAnimation() { // Get the center for the FAB int cx = (int) mContinueFABContainer.getX() + mContinueFABContainer.getMeasuredHeight() / 2; int cy = (int) mContinueFABContainer.getY() + mContinueFABContainer.getMeasuredWidth() / 2; // get the final radius for the clipping circle int dx = Math.max(cx, mTransitionViewWhite.getWidth() - cx); int dy = Math.max(cy, mTransitionViewWhite.getHeight() - cy); float finalRadius = (float) Math.hypot(dx, dy); //mTransitionViewBlue.setLayerType(View.LAYER_TYPE_HARDWARE, null); //mTransitionViewWhite.setLayerType(View.LAYER_TYPE_HARDWARE, null); final SupportAnimator whiteTransitionAnimation = ViewAnimationUtils.createCircularReveal(mTransitionViewWhite, cx, cy, 0, finalRadius); whiteTransitionAnimation.setInterpolator(new AccelerateDecelerateInterpolator()); whiteTransitionAnimation.setDuration(REVEAL_ANIMATION_DURATION); whiteTransitionAnimation.addListener(new SupportAnimator.AnimatorListener() { @Override public void onAnimationStart() { mTransitionViewWhite.bringToFront(); mTransitionViewWhite.setVisibility(View.VISIBLE); mContinueFABContainer.setClickable(false); if (mContinueIcon.getVisibility() == View.VISIBLE) { hideContinueIconAnimations(); } } @Override public void onAnimationEnd() { transitionAnimationWhite = whiteTransitionAnimation; } @Override public void onAnimationCancel() { } @Override public void onAnimationRepeat() { } }); final SupportAnimator blueTransitionAnimation = ViewAnimationUtils.createCircularReveal(mTransitionViewBlue, cx, cy, 0, finalRadius); blueTransitionAnimation.setInterpolator(new AccelerateDecelerateInterpolator()); blueTransitionAnimation.setDuration(REVEAL_ANIMATION_DURATION); blueTransitionAnimation.addListener(new SupportAnimator.AnimatorListener() { @Override public void onAnimationStart() { mTransitionViewBlue.setVisibility(View.VISIBLE); mTransitionViewBlue.bringToFront(); mContinueFABShadow.bringToFront(); mContinueFAB.bringToFront(); } @Override public void onAnimationEnd() { transitionAnimationBlue = blueTransitionAnimation; mTransitionViewBlue.setLayerType(View.LAYER_TYPE_NONE, null); mTransitionViewWhite.setLayerType(View.LAYER_TYPE_NONE, null); } @Override public void onAnimationCancel() { onAnimationEnd(); } @Override public void onAnimationRepeat() { } }); whiteTransitionAnimation.start(); blueTransitionAnimation.setStartDelay(REVEAL_ANIMATION_DELAY); blueTransitionAnimation.start(); new Handler().postDelayed(() -> { Log.d(LOG_TAG, "Navigating to NotificationActivity"); navigateToNotificationActivity(); }, REVEAL_ANIMATION_DELAY + REVEAL_ANIMATION_DURATION); }
Example 6
Source File: NotificationActivity.java From Pocket-Plays-for-Twitch with GNU General Public License v3.0 | 4 votes |
private SupportAnimator showTransitionAnimation() { // Get the center for the FAB int cx = (int) mContinueFABContainer.getX() + mContinueFABContainer.getMeasuredHeight() / 2; int cy = (int) mContinueFABContainer.getY() + mContinueFABContainer.getMeasuredWidth() / 2; // get the final radius for the clipping circle int dx = Math.max(cx, mTransitionViewWhite.getWidth() - cx); int dy = Math.max(cy, mTransitionViewWhite.getHeight() - cy); float finalRadius = (float) Math.hypot(dx, dy); mTransitionViewBlue.setLayerType(View.LAYER_TYPE_HARDWARE, null); mTransitionViewWhite.setLayerType(View.LAYER_TYPE_HARDWARE, null); final SupportAnimator whiteTransitionAnimation = ViewAnimationUtils.createCircularReveal(mTransitionViewWhite, cx, cy, 0, finalRadius); whiteTransitionAnimation.setInterpolator(new AccelerateDecelerateInterpolator()); whiteTransitionAnimation.setDuration(REVEAL_ANIMATION_DURATION); whiteTransitionAnimation.addListener(new SupportAnimator.AnimatorListener() { @Override public void onAnimationStart() { mTransitionViewWhite.bringToFront(); mTransitionViewWhite.setVisibility(View.VISIBLE); mContinueFABContainer.setClickable(false); if (mContinueIcon.getVisibility() == View.VISIBLE) { hideContinueIconAnimations(); } } @Override public void onAnimationEnd() { transitionAnimationWhite = whiteTransitionAnimation; } @Override public void onAnimationCancel() { } @Override public void onAnimationRepeat() { } }); final SupportAnimator blueTransitionAnimation = ViewAnimationUtils.createCircularReveal(mTransitionViewBlue, cx, cy, 0, finalRadius); blueTransitionAnimation.setInterpolator(new AccelerateDecelerateInterpolator()); blueTransitionAnimation.setDuration(REVEAL_ANIMATION_DURATION); blueTransitionAnimation.addListener(new SupportAnimator.AnimatorListener() { @Override public void onAnimationStart() { mTransitionViewBlue.setVisibility(View.VISIBLE); mTransitionViewBlue.bringToFront(); mContinueFABShadow.bringToFront(); mContinueFAB.bringToFront(); } @Override public void onAnimationEnd() { mTransitionViewBlue.setLayerType(View.LAYER_TYPE_NONE, null); mTransitionViewWhite.setLayerType(View.LAYER_TYPE_NONE, null); transitionAnimationBlue = blueTransitionAnimation; } @Override public void onAnimationCancel() { } @Override public void onAnimationRepeat() { } }); whiteTransitionAnimation.start(); blueTransitionAnimation.setStartDelay(REVEAL_ANIMATION_DELAY); blueTransitionAnimation.start(); return blueTransitionAnimation; }
Example 7
Source File: NotificationActivity.java From Pocket-Plays-for-Twitch with GNU General Public License v3.0 | 4 votes |
private SupportAnimator showReverseTransitionAnimation() { mTransitionViewBlue.setLayerType(View.LAYER_TYPE_HARDWARE, null); mTransitionViewWhite.setLayerType(View.LAYER_TYPE_HARDWARE, null); SupportAnimator blueReversed = transitionAnimationBlue.reverse(); blueReversed.setInterpolator(new AccelerateDecelerateInterpolator()); blueReversed.addListener(new SupportAnimator.AnimatorListener() { @Override public void onAnimationStart() { mTransitionViewBlue.setVisibility(View.VISIBLE); mTransitionViewBlue.bringToFront(); } @Override public void onAnimationEnd() { Service.bringToBack(mTransitionViewBlue); mTransitionViewBlue.setVisibility(View.INVISIBLE); } @Override public void onAnimationCancel() { } @Override public void onAnimationRepeat() { } }); blueReversed.setDuration(REVEAL_ANIMATION_DURATION); blueReversed.start(); final SupportAnimator whiteReversed = transitionAnimationWhite.reverse(); whiteReversed.setInterpolator(new AccelerateDecelerateInterpolator()); whiteReversed.addListener(new SupportAnimator.AnimatorListener() { @Override public void onAnimationStart() { mTransitionViewWhite.setVisibility(View.VISIBLE); mTransitionViewWhite.bringToFront(); } @Override public void onAnimationEnd() { Service.bringToBack(mTransitionViewWhite); mTransitionViewBlue.setLayerType(View.LAYER_TYPE_NONE, null); mTransitionViewWhite.setLayerType(View.LAYER_TYPE_NONE, null); mTransitionViewWhite.setVisibility(View.INVISIBLE); mContinueFABContainer.setClickable(true); mContinueIcon.bringToFront(); mContinueIcon.setVisibility(View.VISIBLE); showContinueIconAnimations(360); } @Override public void onAnimationCancel() { } @Override public void onAnimationRepeat() { } }); whiteReversed.setDuration(REVEAL_ANIMATION_DURATION); whiteReversed.setStartDelay(REVEAL_ANIMATION_DELAY); whiteReversed.start(); return whiteReversed; }
Example 8
Source File: LoginActivity.java From Pocket-Plays-for-Twitch with GNU General Public License v3.0 | 4 votes |
/** * Animations only here from and down */ private void showTransitionAnimation() { // Get the center for the FAB int cx = (int) mContinueFABContainer.getX() + mContinueFABContainer.getMeasuredHeight() / 2; int cy = (int) mContinueFABContainer.getY() + mContinueFABContainer.getMeasuredWidth() / 2; // get the final radius for the clipping circle int dx = Math.max(cx, mTransitionViewWhite.getWidth() - cx); int dy = Math.max(cy, mTransitionViewWhite.getHeight() - cy); float finalRadius = (float) Math.hypot(dx, dy); //mTransitionViewBlue.setLayerType(View.LAYER_TYPE_HARDWARE, null); //mTransitionViewWhite.setLayerType(View.LAYER_TYPE_HARDWARE, null); final SupportAnimator whiteTransitionAnimation = ViewAnimationUtils.createCircularReveal(mTransitionViewWhite, cx, cy, 0, finalRadius); whiteTransitionAnimation.setInterpolator(new AccelerateDecelerateInterpolator()); whiteTransitionAnimation.setDuration(REVEAL_ANIMATION_DURATION); whiteTransitionAnimation.addListener(new SupportAnimator.AnimatorListener() { @Override public void onAnimationStart() { mTransitionViewWhite.bringToFront(); mTransitionViewWhite.setVisibility(View.VISIBLE); mContinueFABContainer.setClickable(false); if(mContinueIcon.getVisibility() == View.VISIBLE) { hideContinueIconAnimations(); } } @Override public void onAnimationEnd() { transitionAnimationWhite = whiteTransitionAnimation; } @Override public void onAnimationCancel() { } @Override public void onAnimationRepeat() { } }); final SupportAnimator blueTransitionAnimation = ViewAnimationUtils.createCircularReveal(mTransitionViewBlue, cx, cy, 0, finalRadius); blueTransitionAnimation.setInterpolator(new AccelerateDecelerateInterpolator()); blueTransitionAnimation.setDuration(REVEAL_ANIMATION_DURATION); blueTransitionAnimation.addListener(new SupportAnimator.AnimatorListener() { @Override public void onAnimationStart() { mTransitionViewBlue.setVisibility(View.VISIBLE); mTransitionViewBlue.bringToFront(); mContinueFABShadow.bringToFront(); mContinueFAB.bringToFront(); } @Override public void onAnimationEnd() { transitionAnimationBlue = blueTransitionAnimation; mTransitionViewBlue.setLayerType(View.LAYER_TYPE_NONE, null); mTransitionViewWhite.setLayerType(View.LAYER_TYPE_NONE, null); } @Override public void onAnimationCancel() { onAnimationEnd(); } @Override public void onAnimationRepeat() { } }); whiteTransitionAnimation.start(); blueTransitionAnimation.setStartDelay(REVEAL_ANIMATION_DELAY); blueTransitionAnimation.start(); new Handler().postDelayed(new Runnable() { @Override public void run() { Log.d(LOG_TAG, "Navigating to NotificationActivity"); navigateToNotificationActivity(); } }, REVEAL_ANIMATION_DELAY + REVEAL_ANIMATION_DURATION); }