android.animation.ValueAnimator.cancel()

Here are the examples of the java api android.animation.ValueAnimator.cancel() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

528 Examples 7

19 Source : RightDrawable.java
with Apache License 2.0
from zyyoona7

public void stopAnim() {
    if (mValueAnimator != null) {
        mValueAnimator.cancel();
        mValueAnimator = null;
    }
}

19 Source : SmoothCheckBox.java
with Apache License 2.0
from zuoweitan

private void cancelAnimation() {
    if (mAnimator != null) {
        mAnimator.cancel();
    }
    if (mFloorAnimator != null) {
        mFloorAnimator.cancel();
    }
}

19 Source : QRefreshLayout.java
with MIT License
from zhangxq

/**
 * 全部恢复到初始位置
 */
private void reset() {
    if (animatorToRefresh != null)
        animatorToRefresh.cancel();
    if (animatorToRefreshReset != null)
        animatorToRefreshReset.cancel();
    if (animatorToLoad != null)
        animatorToLoad.cancel();
    if (animatorToLoadReset != null)
        animatorToLoadReset.cancel();
    if (animatorToSecondFloor != null)
        animatorToSecondFloor.cancel();
    viewRefreshContainer.setTranslationY(0);
    viewLoadContainer.setTranslationY(0);
    viewTarget.setTranslationY(0);
}

19 Source : ExpandIconView.java
with Apache License 2.0
from zagum

private void cancelAnimation() {
    if (arrowAnimator != null && arrowAnimator.isRunning()) {
        arrowAnimator.cancel();
    }
}

19 Source : ViewfinderView.java
with MIT License
from yuzhiqiang1993

public void stopAnimator() {
    if (valueAnimator != null) {
        valueAnimator.end();
        valueAnimator.cancel();
        valueAnimator = null;
    }
}

19 Source : RoundedThumbnailView.java
with Apache License 2.0
from Yuloran

/**
 * Stop currently running animators.
 */
private void clearAnimations() {
    // Stop currently running animators.
    if (mThumbnailAnimatorSet != null && mThumbnailAnimatorSet.isRunning()) {
        mThumbnailAnimatorSet.removeAllListeners();
        mThumbnailAnimatorSet.cancel();
        // Release the animator so that a new instance will be created and
        // its listeners properly reconnected.  Fix for b/19034435
        mThumbnailAnimatorSet = null;
    }
    if (mRippleAnimator != null && mRippleAnimator.isRunning()) {
        mRippleAnimator.removeAllListeners();
        mRippleAnimator.cancel();
        // Release the animator so that a new instance will be created and
        // its listeners properly reconnected.  Fix for b/19034435
        mRippleAnimator = null;
    }
}

19 Source : IFloatWindowImpl.java
with Apache License 2.0
from yhaolpz

private void cancelAnimator() {
    if (mAnimator != null && mAnimator.isRunning()) {
        mAnimator.cancel();
    }
}

19 Source : MovieTimer.java
with Apache License 2.0
from yellowcath

public void pause() {
    if (mPaused) {
        return;
    }
    mPaused = true;
    mPausedPlayTime = mAnimator.getCurrentPlayTime();
    mAnimator.cancel();
}

19 Source : GoRefreshLayout.java
with Apache License 2.0
from yanyiqun001

/**
 * 取消返回顶部
 */
private void cancelscrollToTop() {
    if (valueAnimatorToTop != null && valueAnimatorToTop.isRunning()) {
        valueAnimatorToTop.cancel();
    }
}

19 Source : IFloatWindowImpl.java
with Apache License 2.0
from yangchong211

/**
 * 关闭动画
 */
private void cancelAnimator() {
    if (mAnimator != null && mAnimator.isRunning()) {
        mAnimator.cancel();
    }
}

19 Source : ExpandLayout.java
with Apache License 2.0
from yangchong211

/**
 * 清除动画资源
 */
private void clearAnim() {
    if (animation != null) {
        animation.cancel();
        animation = null;
    }
}

19 Source : MiniLoadingView.java
with Apache License 2.0
from xuexiangjys

public void stop() {
    if (mAnimator != null) {
        mAnimator.removeUpdateListener(mUpdateListener);
        mAnimator.removeAllUpdateListeners();
        mAnimator.cancel();
        mAnimator = null;
    }
}

19 Source : ShineButton.java
with Apache License 2.0
from xuexiangjys

public void setCancel() {
    setTintColor(mNormalColor);
    if (mShakeAnimator != null) {
        mShakeAnimator.end();
        mShakeAnimator.cancel();
    }
}

19 Source : SearchBarMover.java
with Apache License 2.0
from xiaojieonly

public void cancelAnimation() {
    if (mSearchBarMoveAnimator != null) {
        mSearchBarMoveAnimator.cancel();
    }
}

19 Source : PieLayout.java
with Apache License 2.0
from WrBug

public void exit() {
    setVisibility(View.GONE);
    mBackgroundAnimator.cancel();
    mActiveSnap = null;
    for (int i = 0; i < mSnapPoints.length; i++) {
        if (mSnapPoints[i] != null) {
            mSnapPoints[i].reset();
        }
    }
    if (mActiveItem != null) {
        mActiveItem.setSelected(false);
    }
    mActiveItem = null;
    mActive = false;
}

19 Source : AdditiveAnimationAccumulator.java
with Apache License 2.0
from wirecube

final void cancel() {
    mAnimator.cancel();
}

19 Source : OperableView.java
with Apache License 2.0
from whataa

private void cancelCheckTask() {
    removeCallbacks(longPressCheck);
    removeCallbacks(tapTimeoutCheck);
    if (gridAnimator != null) {
        gridAnimator.cancel();
        gridAnimator = null;
    }
}

19 Source : CountDownProgress.java
with Apache License 2.0
from wangxiaoxuan217

public void cancel() {
    if (animator != null) {
        animator.cancel();
    }
}

19 Source : GeometricProgressView.java
with Apache License 2.0
from vbohush

private void cancelAnimation() {
    if (isInEditMode())
        return;
    if (animators != null) {
        for (ValueAnimator valueAnimator : animators) {
            valueAnimator.cancel();
        }
        animators.clear();
        animators = null;
    }
}

19 Source : RecorderProgressBar.java
with Apache License 2.0
from Vanish136

// 取消动画
private void cancelAnim() {
    if (mAnimator != null && mAnimator.isRunning())
        mAnimator.cancel();
    mAnimator = null;
}

19 Source : UploadProgressView.java
with MIT License
from UCodeUStory

public void stopAnimation() {
    animator.cancel();
}

19 Source : PathView.java
with MIT License
from totond

/**
 * Stop animation
 */
public void stopAnimation() {
    showPainterActually = false;
    clear();
    if (mAnimator != null) {
        mAnimator.cancel();
    }
}

19 Source : QSBaseRefreshLayout.java
with Apache License 2.0
from tohodog

// 刷新完成
public void refreshComplete() {
    if (mScrollAnimator != null)
        mScrollAnimator.cancel();
    if (refreshStatus == STATUS_REFRESHING) {
        setRefreshStatus(STATUS_REFRESHED);
        scrollAnimation(currentOffset, 0, draggedRefreshView.completeAnimaDuration(), STATUS_NORMAL);
    }
}

19 Source : PlayingIconView.java
with Apache License 2.0
from TanZhiL

public void cancelAnimation() {
    mAnimation.cancel();
    mProgess = 0;
    invalidate();
}

19 Source : MaterialTapTargetPrompt.java
with Apache License 2.0
from stytooldex

/**
 * Stops any current animation and removes references to it.
 */
void cleanUpAnimation() {
    if (mAnimationCurrent != null) {
        mAnimationCurrent.removeAllUpdateListeners();
        mAnimationCurrent.removeAllListeners();
        mAnimationCurrent.cancel();
        mAnimationCurrent = null;
    }
    if (mAnimationFocalRipple != null) {
        mAnimationFocalRipple.removeAllUpdateListeners();
        mAnimationFocalRipple.cancel();
        mAnimationFocalRipple = null;
    }
    if (mAnimationFocalBreathing != null) {
        mAnimationFocalBreathing.removeAllUpdateListeners();
        mAnimationFocalBreathing.cancel();
        mAnimationFocalBreathing = null;
    }
}

19 Source : InstallDialog.java
with Apache License 2.0
from starscryer

private void cleanup() {
    try {
        if (animator != null && animator.isRunning()) {
            animator.cancel();
        }
    } catch (Throwable ignored) {
    }
}

19 Source : BounceLoadingView.java
with Apache License 2.0
from SkySeraph-XKnife

public void stop() {
    if (animator != null) {
        animator.cancel();
        animator = null;
    }
}

19 Source : ValuesAnimation.java
with MIT License
from shrikanth7698

public void cancel() {
    mValueAnimator.cancel();
}

19 Source : DiceLoadingView.java
with MIT License
from samlss

/**
 * Pause the animation.
 */
public void pause() {
    if (mValueAnimator != null && mValueAnimator.isRunning()) {
        mAnimatorPlayTime = mValueAnimator.getCurrentPlayTime();
        mValueAnimator.cancel();
    }
}

19 Source : DiceLoadingView.java
with MIT License
from samlss

/**
 * Cancel the animation.
 */
public void stop() {
    if (mValueAnimator != null) {
        mValueAnimator.cancel();
    }
}

19 Source : ExpandablePageLayout.java
with Apache License 2.0
from saket

private void stopToolbarAnimation() {
    if (toolbarAnimator != null) {
        toolbarAnimator.cancel();
    }
}

19 Source : BaseExpandablePageLayout.java
with Apache License 2.0
from saket

protected void cancelOngoingClipAnimation() {
    if (dimensionAnimator != null) {
        dimensionAnimator.cancel();
    }
}

19 Source : CircularProgressView.java
with GNU Affero General Public License v3.0
from RooyeKhat-Media

/**
 * Stops the animation
 */
public void stopAnimation() {
    if (startAngleRotate != null) {
        startAngleRotate.cancel();
        startAngleRotate = null;
    }
    if (progressAnimator != null) {
        progressAnimator.cancel();
        progressAnimator = null;
    }
    if (indeterminateAnimator != null) {
        indeterminateAnimator.cancel();
        indeterminateAnimator = null;
    }
    actualProgress = 0f;
}

19 Source : RadarScanView.java
with Apache License 2.0
from REBOOTERS

public void stopAnim() {
    if (mScaleMinAnimator != null) {
        mScaleMinAnimator.cancel();
    }
    if (mScaleMaxAnimator != null) {
        mScaleMaxAnimator.cancel();
    }
    if (mRotateAnimator != null) {
        mRotateAnimator.cancel();
    }
}

19 Source : FlipView.java
with Apache License 2.0
from REBOOTERS

/**
 * @return true if ended a peak
 */
private boolean endPeak() {
    final boolean wasPeaking = mPeakAnim != null;
    if (mPeakAnim != null) {
        mPeakAnim.cancel();
        mPeakAnim = null;
    }
    return wasPeaking;
}

19 Source : ClockView.java
with Apache License 2.0
from REBOOTERS

public void stop() {
    if (mAnimator != null) {
        mAnimator.cancel();
    }
}

19 Source : DragLayout.java
with Apache License 2.0
from ReadyShowShow

private void cancelAnim() {
    if (mCloseAnim != null && mCloseAnim.isRunning()) {
        mCloseAnim.cancel();
    }
    if (mExpandAnim != null && mExpandAnim.isRunning()) {
        mExpandAnim.cancel();
    }
}

19 Source : ImageLoadingView.java
with MIT License
from raedev

/**
 * 释放动画资源
 */
public void release() {
    if (mLoadingValueAnimator != null)
        mLoadingValueAnimator.cancel();
    if (mAnimators[0] != null)
        mAnimators[0].cancel();
    if (mAnimators[1] != null)
        mAnimators[1].cancel();
}

19 Source : ImageLoadingView.java
with MIT License
from raedev

protected void stopLoading() {
    if (mLoadingValueAnimator != null) {
        mLoadingValueAnimator.cancel();
    }
}

19 Source : ConfettiManager.java
with Apache License 2.0
from QuixomTech

/**
 * Terminate the currently running animation if there is any.
 */
public void terminate() {
    if (animator != null) {
        animator.cancel();
    }
    confettiView.terminate();
}

19 Source : SlideBackView.java
with Apache License 2.0
from qinci

private void cancelAnim() {
    if (animator != null && animator.isRunning()) {
        animator.cancel();
    }
}

19 Source : ShoppingListsBottomSheet.java
with GNU General Public License v3.0
from patzly

private void hideAndStopProgress() {
    if (confirmProgressAnimator != null) {
        confirmProgressAnimator.cancel();
    }
    if (progressConfirm.getProgress() != 100) {
        showMessage(R.string.msg_press_hold_confirm);
    }
}

19 Source : ShimmerDrawable.java
with MIT License
from onlyloveyd

/**
 * Stops the shimmer animation.
 */
public void stopShimmer() {
    if (mValueAnimator != null && isShimmerStarted()) {
        mValueAnimator.cancel();
    }
}

19 Source : LocationAnimator.java
with Apache License 2.0
from neXenio

public void cancel() {
    lareplacedudeAnimator.cancel();
    longitudeAnimator.cancel();
    accuracyAnimator.cancel();
}

19 Source : LoadingView.java
with MIT License
from netease-im

// 公开方法
/**
 * 停止动画
 */
public void stop() {
    if (anim != null) {
        anim.cancel();
        anim = null;
    }
}

19 Source : SubstringLayoutAnimator.java
with GNU General Public License v3.0
from NekoX-Dev

public void cancel() {
    if (valueAnimator != null) {
        valueAnimator.cancel();
    }
    animateTextChange = false;
}

19 Source : RecyclerAnimationScrollHelper.java
with GNU General Public License v3.0
from NekoX-Dev

public void cancel() {
    if (animator != null)
        animator.cancel();
    clear();
}

19 Source : PullForegroundDrawable.java
with GNU General Public License v3.0
from NekoX-Dev

public void doNotShow() {
    if (textSwipingAnimator != null) {
        textSwipingAnimator.cancel();
    }
    if (textIntAnimator != null) {
        textIntAnimator.cancel();
    }
    if (cell != null) {
        cell.removeCallbacks(textInRunnable);
    }
    if (accentRevalAnimatorIn != null) {
        accentRevalAnimatorIn.cancel();
    }
    textSwappingProgress = 1f;
    arrowRotateProgress = 1f;
    animateToEndText = false;
    arrowAnimateTo = false;
    animateToTextIn = false;
    wreplacedendCallback = false;
    textInProgress = 0f;
    isOut = true;
    setOutProgress(1f);
    animateToColorize = false;
    accentRevalProgress = 0f;
}

19 Source : PullForegroundDrawable.java
with GNU General Public License v3.0
from NekoX-Dev

public void destroyView() {
    cell = null;
    if (textSwipingAnimator != null) {
        textSwipingAnimator.cancel();
    }
    if (outAnimator != null) {
        outAnimator.removeAllListeners();
        outAnimator.cancel();
    }
}

19 Source : PullForegroundDrawable.java
with GNU General Public License v3.0
from NekoX-Dev

public void resetText() {
    if (textIntAnimator != null) {
        textIntAnimator.cancel();
    }
    if (cell != null) {
        cell.removeCallbacks(textInRunnable);
    }
    textInProgress = 0f;
    animateToTextIn = false;
    wreplacedendCallback = false;
}

See More Examples